summaryrefslogtreecommitdiff
path: root/ext/reflection/tests
Commit message (Collapse)AuthorAgeFilesLines
* Fix leak on consteval exception in ReflectionClass::__toString()Nikita Popov2020-08-311-0/+17
|
* Check update constant failure in ReflectionClassConstant::__toString()Nikita Popov2020-08-311-0/+18
|
* Fixed bug #79820Christopher Broadbent2020-07-151-0/+22
| | | | | | | | | Similar to what is done for ReflectionType itself, copy the type name stored inside ReflectionProperty. Also make sure the type field is always initialized for dynamic properties. This is a non-issue in PHP 8, because we store a pointer to the property_info there, rather than a copy.
* Fix #69804: ::getStaticPropertyValue() throws on protected propsChristoph M. Becker2020-06-243-34/+70
| | | | | | | | | | | | `ReflectionClass` allows reading of the values of private and protected constants, and also to get private and protected static methods. Therefore getting the values of private and protected static properties is also permissible, especially since `::getStaticProperties()` already allows to do so. We also allow ::setStaticPropertyValue() to modify private and protected properties, because otherwise this method is useless, as modifying public properties can be done directly.
* Fix #79487: ::getStaticProperties() ignores property modificationsChristoph M. Becker2020-06-241-0/+34
| | | | | When retrieving the static class properties via reflection, we have to cater to possible modifications.
* Revert "Fix #79487: ::getStaticProperties() ignores property modifications"Christoph M. Becker2020-06-231-34/+0
| | | | This reverts commit a895bb6885fbceea3e8375816969d5510d8d082e.
* Fix #79487: ::getStaticProperties() ignores property modificationsChristoph M. Becker2020-06-231-0/+34
| | | | | When retrieving the static class properties via reflection, we have to cater to possible modifications.
* Fixed bug #79683Nikita Popov2020-06-091-0/+35
| | | | | | | Reset fake_scope during __toString() call. I'll check if we can solve this more globally in master, by resetting fake_scope in zend_call_function.
* Merge branch 'PHP-7.3' into PHP-7.4Nikita Popov2020-02-281-0/+34
|\ | | | | | | | | * PHP-7.3: Fixed bug #79062
| * Fixed bug #79062Nikita Popov2020-02-281-0/+34
| | | | | | | | Back up the doc comment when performing heredoc scanahead.
* | 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
| |
* | 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)
* | Add a test for ReflectionClass:getInterfaceNames()Fabien Villepinte2019-11-041-0/+7
| | | | | | | | The method was not tested against a class without interface.
* | 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.
* | Revert "Add tests for ReflectionZendExtension"Fabien Villepinte2019-10-213-70/+0
| | | | | | | | | | | | This reverts commit 4194e0415b02827b0d5eeff13771eb6642955b0f. There were already tests for this class.
* | Add tests for ReflectionZendExtensionFabien Villepinte2019-10-213-0/+70
| |
* | 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
| | |
* | | Fixed bug #78410Nikita Popov2019-08-131-6/+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.
* | | Deprecate Reflection export() methodsNikita Popov2019-07-2228-57/+108
| | | | | | | | | | | | And remove the Reflector::export() interface method.
* | | 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.
* | | 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.
* | | 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.3' into PHP-7.4Nikita Popov2019-05-091-0/+25
|\ \ \ | |/ /
| * | Merge branch 'PHP-7.2' into PHP-7.3Nikita Popov2019-05-091-0/+25
| |\ \ | | |/
| | * Fixed bug #75186Nikita Popov2019-05-091-0/+25
| | |
* | | Fixed bug #77951Nikita Popov2019-05-091-12/+16
| | | | | | | | | | | | | | | Treat singleton references as non-references in ReflectionReference and return null for them.
* | | Merge branch 'PHP-7.3' into PHP-7.4Nikita Popov2019-04-151-0/+38
|\ \ \ | |/ /
| * | Merge branch 'PHP-7.2' into PHP-7.3Nikita Popov2019-04-151-0/+38
| |\ \ | | |/
| | * Fixed bug #77882Nikita Popov2019-04-151-0/+38
| | |
* | | Merge branch 'PHP-7.3' into PHP-7.4Nikita Popov2019-03-221-0/+22
|\ \ \ | |/ /
| * | Merge branch 'PHP-7.2' into PHP-7.3Nikita Popov2019-03-221-0/+22
| |\ \ | | |/
| | * Fixed bug #77772Nikita Popov2019-03-221-0/+22
| | |
| | * Sync leading and final newlines in *.phpt sectionsPeter Kokot2018-10-1559-73/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds missing newlines, trims multiple redundant final newlines into a single one, and trims redundant leading newlines in all *.phpt sections. According to POSIX, a line is a sequence of zero or more non-' <newline>' characters plus a terminating '<newline>' character. [1] Files should normally have at least one final newline character. C89 [2] and later standards [3] mention a final newline: "A source file that is not empty shall end in a new-line character, which shall not be immediately preceded by a backslash character." Although it is not mandatory for all files to have a final newline fixed, a more consistent and homogeneous approach brings less of commit differences issues and a better development experience in certain text editors and IDEs. [1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206 [2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2 [3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
| | * Trim trailing whitespace in *.phptPeter Kokot2018-10-14129-257/+257
| | |
| | * Sync leading and final newlines in source code filesPeter Kokot2018-10-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds missing newlines, trims multiple redundant final newlines into a single one, and trims redundant leading newlines. According to POSIX, a line is a sequence of zero or more non-' <newline>' characters plus a terminating '<newline>' character. [1] Files should normally have at least one final newline character. C89 [2] and later standards [3] mention a final newline: "A source file that is not empty shall end in a new-line character, which shall not be immediately preceded by a backslash character." Although it is not mandatory for all files to have a final newline fixed, a more consistent and homogeneous approach brings less of commit differences issues and a better development experience in certain text editors and IDEs. [1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206 [2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2 [3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
| | * Trim trailing whitespace in source code filesPeter Kokot2018-10-131-2/+2
| | |
| * | Sync leading and final newlines in *.phpt sectionsPeter Kokot2018-10-1554-68/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds missing newlines, trims multiple redundant final newlines into a single one, and trims redundant leading newlines in all *.phpt sections. According to POSIX, a line is a sequence of zero or more non-' <newline>' characters plus a terminating '<newline>' character. [1] Files should normally have at least one final newline character. C89 [2] and later standards [3] mention a final newline: "A source file that is not empty shall end in a new-line character, which shall not be immediately preceded by a backslash character." Although it is not mandatory for all files to have a final newline fixed, a more consistent and homogeneous approach brings less of commit differences issues and a better development experience in certain text editors and IDEs. [1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206 [2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2 [3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
| * | Trim trailing whitespace in *.phptPeter Kokot2018-10-14108-235/+235
| | |
| * | Sync leading and final newlines in source code filesPeter Kokot2018-10-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds missing newlines, trims multiple redundant final newlines into a single one, and trims redundant leading newlines. According to POSIX, a line is a sequence of zero or more non-' <newline>' characters plus a terminating '<newline>' character. [1] Files should normally have at least one final newline character. C89 [2] and later standards [3] mention a final newline: "A source file that is not empty shall end in a new-line character, which shall not be immediately preceded by a backslash character." Although it is not mandatory for all files to have a final newline fixed, a more consistent and homogeneous approach brings less of commit differences issues and a better development experience in certain text editors and IDEs. [1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206 [2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2 [3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
* | | Use EXPECT when possibleGabriel Caruso2019-03-111-1/+1
| | | | | | | | | | | | EXPECTF logic in run-tests.php is considerable, so let's avoid it.
* | | More zpp error/variation test removalsNikita Popov2019-03-065-155/+0
| | | | | | | | | | | | | | | Some of these tests also check non-zpp conditions -- however, there is always some other test that also checks those error conditions.
* | | Remove more zpp error testsNikita Popov2019-03-0524-574/+0
| | |
* | | Implement fine-grained conflict handlingNikita Popov2019-02-201-0/+0
| | | | | | | | | | | | | | | | | | Tests can specify conflict keys, either in --CONFLICTS-- or a per-directory CONFLICTS file. Non-conflicting tests may be run in parallel.
* | | Fixed bug #77631Tyson Andre2019-02-191-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | Do not include unbound anonymous classes in get_declared_classes(). Note that earlier PHP versions would include the anonymous class in get_declared_classes(), and return false until the class was bound, but would not crash.
* | | run-tests.php: experimental parallel testing supportAndrea Faulds2019-02-181-0/+0
| | |