summaryrefslogtreecommitdiff
path: root/ext/simplexml
Commit message (Collapse)AuthorAgeFilesLines
* Improve class entry generationMáté Kocsis2021-02-161-3/+2
| | | | Related to GH-6701
* Implicitly enable function entry generation when class entry generation is ↵Máté Kocsis2021-02-092-5/+2
| | | | | | enabled Closes GH-6675
* Add support for generating class entries from stubsMáté Kocsis2021-01-263-10/+29
| | | | | | Closes GH-6289 Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>
* Replace zend_bool uses with boolNikita Popov2021-01-151-14/+14
| | | | | | | We're starting to see a mix between uses of zend_bool and bool. Replace all usages with the standard bool type everywhere. Of course, zend_bool is retained as an alias.
* Run tidyNikita Popov2020-09-183-3/+3
| | | | | This should fix most of the remaining issues with tabs and spaces being mixed in tests.
* Generate arginfosMáté Kocsis2020-09-161-4/+4
|
* Display string default values in stubs more uniformlyMáté Kocsis2020-09-161-3/+3
| | | | Settling on using quoted string
* Fix UNKNOWN default values in various extensionsMáté Kocsis2020-09-073-5/+5
| | | | Closes GH-6075
* Promote warnings to exceptions in ext/simplexmlMáté Kocsis2020-08-258-47/+69
| | | | | | Closes GH-6011 Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>
* Don't return temporary from SXE write_property handlerNikita Popov2020-08-252-24/+31
| | | | | | | | Return the original value. If we don't return the original value, we need to own the zval, which we don't. For clarity also switch things to work on a zend_string* value instead of a zval*.
* Simplify change_node_zval implementationNikita Popov2020-08-251-25/+6
| | | | At this point, the value has already been converted into a string.
* Add a missing null check in simplexmlNikita Popov2020-08-132-0/+11
|
* Throw on uninitialized SimpleXMLElementNikita Popov2020-08-134-25/+78
| | | | | Elevate this warning into an Error, as usual. Add a few checks in places that were missing them.
* Add many missing closing PHP tags to testsMáté Kocsis2020-08-091-0/+1
| | | | Closes GH-5958
* Consolidate Parameter Names For ext/simplexmlBenjamin Eberlei2020-07-272-23/+23
| | | | Co-authored-by: Thomas Weinert <thomas@weinert.info>
* Remove proto comments from C filesMax Semenik2020-07-061-98/+49
| | | | Closes GH-5758
* Add get_gc handle for object iteratorsNikita Popov2020-07-011-1/+2
| | | | Optional handler with the same semantics as the object handler.
* Make SimpleXMLElement a RecursiveIteratorNikita Popov2020-06-2410-294/+212
| | | | | | | | | | | | | | | | | | Context: https://externals.io/message/108789 This essentially moves the functionality of SimpleXMLIterator into SimpleXMLElement, and makes SimpleXMLIterator a no-op extension. Ideally SimpleXMLElement would be an IteratorAggregate, whose getIterator() method returns SimpleXMLIterator. However, because SimpleXMLIterator extends SimpleXMLElement (and code depends on this in non-trivial ways), this is not possible. The only way to not keep SimpleXMLElement as a magic Traversable (that implements neither Iterator nor IteratorAggregate) is to move the SimpleXMLIterator functionality into it. Closes GH-5234.
* Include stub hash in generated arginfo filesNikita Popov2020-06-242-2/+4
| | | | | | | | | | | | The hash is used to check whether the arginfo file needs to be regenerated. PHP-Parser will only be downloaded if this is actually necessary. This ensures that release artifacts will never try to regenerate stubs and thus fetch PHP-Parser, as long as you do not modify any files. Closes GH-5739.
* Fix #63575: Root elements are not properly clonedChristoph M. Becker2020-06-173-7/+45
| | | | | Cloning of root elements has to preserve that property, so they require some special treatment.
* Add ZVAL_OBJ_COPY macroNikita Popov2020-06-171-5/+4
| | | | | For the common ZVAL_OBJ + GC_ADDREF pattern. This mirrors the existing ZVAL_STR_COPY API.
* Fix warning of strict-prototypestwosee2020-06-072-2/+2
| | | | Closes GH-5673.
* Clean up calls to extension_loaded('json') in testsTyson Andre2020-05-281-1/+0
| | | | | | These are no longer needed after https://wiki.php.net/rfc/always_enable_json Closes GH-5637
* Fix [-Wundef] warning in SimpleXML extensionGeorge Peter Banyard2020-05-201-1/+1
|
* Merge branch 'PHP-7.4'Christoph M. Becker2020-05-015-108/+7
|\ | | | | | | | | * PHP-7.4: Fix #79528: Different object of the same xml between 7.4.5 and 7.4.4
| * Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2020-05-015-108/+7
| |\ | | | | | | | | | | | | * PHP-7.3: Fix #79528: Different object of the same xml between 7.4.5 and 7.4.4
| | * Fix #79528: Different object of the same xml between 7.4.5 and 7.4.4Christoph M. Becker2020-05-015-108/+7
| | | | | | | | | | | | | | | | | | Revert "Fix #61597: SXE properties may lack attributes and content" This reverts commit 7c081db885756d7b176a55b90b8746f664d1e042.
* | | Generate function entries from stubsMáté Kocsis2020-04-206-53/+85
| | | | | | | | | | | | | | | Converts ext/pcntl, ext/simplexml, ext/snmp, ext/soap, ext/sqlite3. Closes GH-5421
* | | Fix nullable types in PHPDocMáté Kocsis2020-04-121-2/+2
| | |
* | | Store default parameter values of internal functions in arg infoMáté Kocsis2020-04-081-20/+20
| | | | | | | | | | | | | | | | | | | | | Closes GH-5353. From now on, PHP will have reflection information about default values of parameters of internal functions. Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>
* | | Improve undefined variable error messagesMáté Kocsis2020-03-311-1/+1
| | | | | | | | | | | | Closes GH-5312
* | | Clarify SimpleXML comparison logicNikita Popov2020-03-311-7/+15
| | |
* | | Add a ZEND_UNCOMPARABLE valueNikita Popov2020-03-311-1/+1
| | | | | | | | | | | | | | | | | | To explicitly indicate that objects are uncomparable. For now this has no functional difference from the usual 1 return value, but makes intent clearer.
* | | Improve error messages of various extensionsMáté Kocsis2020-03-232-4/+4
| | | | | | | | | | | | Closes GH-5278
* | | Revert "Fetch for read in nested property assignments"Nikita Popov2020-03-182-7/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit bb43a3822e42dbd15b1d416a166549d3980b379a. After thinking about this a bit more, this is now going to be a complete solution for the "readonly properties" case, for example: unset($foo->readOnly->bar); should also be legal and $foo->readOnly['bar'] = 42; should also be legal if $foo->readOnly is not an array but an ArrayAccess object. I think it may be better to distinguish better on the BP_VAR flag level. Reverting for now.
* | | Fetch for read in nested property assignmentsNikita Popov2020-03-182-14/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | $a->b->c = 'd'; is now compiled the same way as $b = $a->b; $b->c = 'd'; That is, we perform a read fetch on $a->b, rather than a write fetch. This is possible, because PHP 8 removed auto-vivification support for objects, so $a->b->c = 'd' may no longer modify $a->b proper (i.e. not counting interior mutability of the object). Closes GH-5250.
* | | Merge branch 'PHP-7.4'Christoph M. Becker2020-03-125-7/+108
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Fix #61597: SXE properties may lack attributes and content
| * | Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2020-03-125-7/+108
| |\ \ | | |/ | | | | | | | | | * PHP-7.3: Fix #61597: SXE properties may lack attributes and content
| | * Fix #61597: SXE properties may lack attributes and contentChristoph M. Becker2020-03-125-7/+108
| | | | | | | | | | | | | | | We must not treat a node as string if it has attributes, unless it is an entity declaration which is always treated as string by simplexml.
* | | Improve error message of foreachMáté Kocsis2020-03-092-2/+2
| | | | | | | | | | | | Closes GH-5240
* | | Define Stringable with __toString():string methodNicolas Grekas2020-03-023-5/+5
| | |
* | | Remove the deprecated reflection export methodsMáté Kocsis2020-02-191-33/+0
| | | | | | | | | | | | Closes GH-5188
* | | Make type error messages more consistentMáté Kocsis2020-02-171-2/+2
| | | | | | | | | | | | Closes GH-5092
* | | Reindent phpt filesNikita Popov2020-02-0328-146/+146
| | |
* | | Fix indentation and whitespaces in testsMáté Kocsis2020-01-311-3/+3
| | | | | | | | | | | | In preparation for GH-5074
* | | Use RETURN_THROWS() after zend_throw_exception() in most of the extensionsMáté Kocsis2020-01-021-4/+4
| | |
* | | Use RETURN_THROWS() during ZPP in most of the extensionsMáté Kocsis2019-12-312-23/+23
| | | | | | | | | | | | Except for some bigger ones: reflection, sodium, spl
* | | Fix #78880: Spelling error reportChristoph M. Becker2019-12-212-2/+2
| | | | | | | | | | | | | | | | | | | | | We fix the most often occuring typos according to a recent codespell report[1] in tests, code comments and documentation. [1] <https://fossies.org/linux/test/php-src-master-f8f48ce.191129.tar.gz/codespell.html>.
* | | Add union return types with one classMáté Kocsis2019-11-182-6/+4
| | |
* | | Clean DONE tags from testsFabien Villepinte2019-11-0769-143/+0
| | | | | | | | | | | | | | | | | | | | | Remove most of the `===DONE===` tags and its variations. Keep `===DONE===` if the test output otherwise becomes empty. Closes GH-4872.