summaryrefslogtreecommitdiff
path: root/ext/reflection/tests
Commit message (Collapse)AuthorAgeFilesLines
...
* | | Reindent phpt filesNikita Popov2020-02-03185-1503/+1503
| | |
* | | Fix indentation and whitespaces in testsMáté Kocsis2020-01-311-4/+4
| | | | | | | | | | | | In preparation for GH-5074
* | | Add ReflectionProperty::getDefaultValue and ReflectionProperty::hasDefaultValueBenjamin Eberlei2020-01-222-0/+133
| | |
* | | Merge branch 'PHP-7.4'Nikita Popov2020-01-171-0/+16
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Fixed bug #79115
| * | Merge branch 'PHP-7.3' into PHP-7.4Nikita Popov2020-01-171-0/+16
| |\ \ | | |/ | | | | | | | | | * PHP-7.3: Fixed bug #79115
| | * Fixed bug #79115Nikita Popov2020-01-171-0/+16
| | |
* | | Fix #78880: Final spelling fixesMáté Kocsis2020-01-161-1/+1
| | |
* | | Fix reflection leak if type inside type list is resolvedNikita Popov2020-01-161-0/+6
| | |
* | | Fix #78880: Another bunch of spelling errorsMáté Kocsis2020-01-161-1/+1
| | |
* | | Use RETURN_THROWS() after zend_throw_exception() in reflection extensionMáté Kocsis2020-01-031-6/+2
| | |
* | | Fix #78880: Spelling error reportChristoph M. Becker2019-12-2111-56/+56
| | | | | | | | | | | | | | | | | | | | | 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>.
* | | Merge branch 'PHP-7.4'Dmitry Stogov2019-12-091-0/+38
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Fixed bug #78895 (Reflection detects abstract non-static class as abstract static. IS_IMPLICIT_ABSTRACT is not longer used)
| * | Fixed bug #78895 (Reflection detects abstract non-static class as abstract ↵Dmitry Stogov2019-12-091-0/+38
| | | | | | | | | | | | static. IS_IMPLICIT_ABSTRACT is not longer used)
* | | Implement union typesNikita Popov2019-11-082-9/+126
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to RFC: https://wiki.php.net/rfc/union_types_v2 The type representation now makes use of both the pointer payload and the type mask at the same time. Additionall, zend_type_list is introduced as a new kind of pointer payload, which is used to store multiple class types. Each of the class types is a tagged pointer, which may be either a class name or class entry. The latter is only used for typed properties, while arguments/returns will instead use cache slots. A type list can contain a mix of both names and CEs at the same time, as not all classes may be resolvable. One thing this is missing is support for union types in arginfo and stubs, which I want to handle separately. I've also dropped the special object code from the JIT implementation for now -- I plan to add this back in a different form at a later time. For now I did not want to include non-trivial JIT changes together with large functional changes. Another possible piece of follow-up work is to implement "iterable" as an internal alias for "array|Traversable". I believe this will eliminate quite a few special-cases that had to be implemented. Closes GH-4838.
* | | Clean DONE tags from testsFabien Villepinte2019-11-0749-103/+0
| | | | | | | | | | | | | | | | | | | | | Remove most of the `===DONE===` tags and its variations. Keep `===DONE===` if the test output otherwise becomes empty. Closes GH-4872.
* | | Merge branch 'PHP-7.4'Fabien Villepinte2019-11-041-0/+7
|\ \ \ | |/ /
| * | Add a test for ReflectionClass:getInterfaceNames()Fabien Villepinte2019-11-041-0/+7
| | | | | | | | | | | | The method was not tested against a class without interface.
* | | Merge branch 'PHP-7.4'Nikita Popov2019-11-041-0/+22
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Fixed bug #78774
| * | Fixed bug #78774Nikita Popov2019-11-041-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The string held by the zend_type may be released if the property type gets resolved to a CE. I initially wanted to fix this by storing a zend_type* instead (so the property type resolution propagates to the ReflectionType), but decided against this in light of upcoming union types support, where we also need to represent parts of the union, and will not have a single zend_type* we can reference.
* | | Improve reflection arginfo stubsChristoph M. Becker2019-10-261-6/+0
| | |
* | | Add stubs for ext-reflectionThomas Gerbet2019-10-262-15/+15
| | |
* | | Fix and undeprecate ReflectionType::__toString()Nikita Popov2019-10-222-15/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add deprecated _ZendTestClass::__toString() method to preserve an existing test. ReflectionType::__toString() will now return a complete representation of the type, as it should have originally. Users that relied on nullability being absent should have been pushed to ReflectionNamedType::getName() by the deprecation of ReflectionType::__toString() in PHP 7.1 / PHP 7.4.
* | | Merge branch 'PHP-7.4'Fabien Villepinte2019-10-213-70/+0
|\ \ \ | |/ /
| * | Revert "Add tests for ReflectionZendExtension"Fabien Villepinte2019-10-213-70/+0
| | | | | | | | | | | | | | | | | | This reverts commit 4194e0415b02827b0d5eeff13771eb6642955b0f. There were already tests for this class.
* | | Merge branch 'PHP-7.4'Fabien Villepinte2019-10-213-0/+70
|\ \ \ | |/ /
| * | Add tests for ReflectionZendExtensionFabien Villepinte2019-10-213-0/+70
| | |
* | | Merge branch 'PHP-7.4'Joe Watkins2019-10-212-30/+44
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Fix bug #78697: inaccurate error message
| * | Merge branch 'PHP-7.3' into PHP-7.4Joe Watkins2019-10-212-30/+44
| |\ \ | | |/ | | | | | | | | | * PHP-7.3: Fix bug #78697: inaccurate error message
| | * Merge branch 'PHP-7.2' into PHP-7.3Joe Watkins2019-10-212-30/+44
| | |\ | | | | | | | | | | | | | | | | * PHP-7.2: Fix bug #78697: inaccurate error message
| | | * Fix bug #78697: inaccurate error messageFabien Villepinte2019-10-212-30/+44
| | | |
* | | | Convert some notices to warningsNikita Popov2019-10-022-2/+2
| | | | | | | | | | | | | | | | Part of https://wiki.php.net/rfc/engine_warnings.
* | | | Update error messages in some more testsNikita Popov2019-09-232-2/+2
| | | |
* | | | Standardize type printing in reflectionNikita Popov2019-09-231-2/+2
| | | | | | | | | | | | | | | | Use ?T instead of "T or NULL".
* | | | Merge branch 'PHP-7.4'Nikita Popov2019-08-131-6/+18
|\ \ \ \ | |/ / /
| * | | Fixed bug #78410Nikita Popov2019-08-131-6/+18
| | | |
* | | | Merge branch 'PHP-7.4'Nikita Popov2019-07-222-14/+18
|\ \ \ \ | |/ / /
| * | | Special-case rc=1 self-referential arrays in ReflectionReferenceNikita Popov2019-07-221-0/+17
| | | | | | | | | | | | | | | | | | | | New fix for bug #78263. This is special-cased elsewhere in the engine, so we need to mirror it here.
| * | | Revert "Add ReflectionReference::getRefcount()"Nikita Popov2019-07-221-14/+1
| | | | | | | | | | | | | | | | This reverts commit 428cfdd1810b17f0064b7691276f0eb92dc963b6.
* | | | Merge branch 'PHP-7.4'Nikita Popov2019-07-2227-56/+103
|\ \ \ \ | |/ / /
| * | | Deprecate Reflection export() methodsNikita Popov2019-07-2228-57/+108
| | | | | | | | | | | | | | | | And remove the Reflector::export() interface method.
* | | | Merge branch 'PHP-7.4'Nikita Popov2019-07-081-1/+14
|\ \ \ \ | |/ / /
| * | | Add ReflectionReference::getRefcount()Nikita Popov2019-07-081-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | And don't return null for rc=1 references. Leave it to the user to decide whether or not they want to consider these as references or not. Fixes bug #78263.
* | | | Don't verify arginfo types for internal functionsNikita Popov2019-06-172-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To avoid duplicate type checks. In debug builds arginfo is still checked and will generate an assertions if the function doesn't subsequently throw an exception. Some test results change due to differences in zpp and arginfo error messages.
* | | | Merge branch 'PHP-7.4'Nikita Popov2019-06-053-3/+12
|\ \ \ \ | |/ / /
| * | | Deprecate ReflectionType::__toString()Nikita Popov2019-06-053-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We weren't able to do this in 7.1 because the deprecation notice may be converted to an exception and __toString() can't throw, which means that it ultimately become a fatal error. This issue is resolved now, so we can mark the method as deprecated.
* | | | Merge branch 'PHP-7.4'Nikita Popov2019-06-051-1/+5
|\ \ \ \ | |/ / /
| * | | Allow exceptions in __toString()Nikita Popov2019-06-051-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RFC: https://wiki.php.net/rfc/tostring_exceptions And convert some object to string conversion related recoverable fatal errors into Error exceptions. Improve exception safety of internal code performing string conversions.
* | | | Merge branch 'PHP-7.4'Nikita Popov2019-05-091-0/+25
|\ \ \ \ | |/ / /
| * | | Merge branch 'PHP-7.3' into PHP-7.4Nikita Popov2019-05-091-0/+25
| |\ \ \ | | |/ /
| | * | Merge branch 'PHP-7.2' into PHP-7.3Nikita Popov2019-05-091-0/+25
| | |\ \ | | | |/