summaryrefslogtreecommitdiff
path: root/ext/reflection
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* | Apply tidy formattingNikita Popov2020-02-031-1/+1
| | | | | | | | Mostly reindent PHP scripts to spaces.
* | Merge branch 'PHP-7.3' into PHP-7.4Nikita Popov2020-01-172-0/+18
|\ \ | |/ | | | | | | * PHP-7.3: Fixed bug #79115
| * Fixed bug #79115Nikita Popov2020-01-172-0/+18
| |
* | Fixed bug #78895 (Reflection detects abstract non-static class as abstract ↵Dmitry Stogov2019-12-092-1/+40
| | | | | | | | 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-042-1/+35
| | | | | | | | | | | | | | | | | | | | 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-213-31/+45
|\ \ | |/ | | | | | | * PHP-7.3: Fix bug #78697: inaccurate error message
| * Merge branch 'PHP-7.2' into PHP-7.3Joe Watkins2019-10-213-31/+45
| |\ | | | | | | | | | | | | * PHP-7.2: Fix bug #78697: inaccurate error message
| | * Fix bug #78697: inaccurate error messageFabien Villepinte2019-10-213-31/+45
| | |
* | | Fix number of required arguments in arginfoNikita Popov2019-10-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * pack() only requires one argument * stream_context_set_option() only requires two arguments * ReflectionMethod::getClosure() accepts no args for static methods * DOMDocument::createProcessingInstruction() only requires one arg * DOMImplementation::createDocument() only requires two arguments * DOMDocument::importNode() only requires one arg * mysql_get_client_version() doesn't accept any args, despite what the docs say...
* | | Fixed bug #78410Nikita Popov2019-08-132-10/+23
| | |
* | | Special-case rc=1 self-referential arrays in ReflectionReferenceNikita Popov2019-07-222-2/+28
| | | | | | | | | | | | | | | 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-222-40/+2
| | | | | | | | | | | | This reverts commit 428cfdd1810b17f0064b7691276f0eb92dc963b6.
* | | Deprecate Reflection export() methodsNikita Popov2019-07-2229-68/+118
| | | | | | | | | | | | And remove the Reflector::export() interface method.
* | | Evaluate constant in class scopeDmitry Stogov2019-07-221-1/+1
| | |
* | | Don't call Reflection::export() internallyNikita Popov2019-07-111-52/+32
| | | | | | | | | | | | | | | | | | export() methods were implemented in a roundabout way, where they would call Reflection::export(), which would then call __toString(). Cut out the middleman by directly calling __toString().
* | | Add ReflectionReference::getRefcount()Nikita Popov2019-07-082-2/+40
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Cheaper checks for exceptions thrown from __toString()Dmitry Stogov2019-06-061-4/+4
| | |
* | | Deprecate ReflectionType::__toString()Nikita Popov2019-06-054-7/+13
| | | | | | | | | | | | | | | | | | | | | 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-052-32/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Replace ZVAL_COPY() and ZVAL_COPY_VALUE() for IS_OBJECT by cheaper macrosDmitry Stogov2019-05-281-9/+14
| | |
* | | Add RETURN_EMPTY_ARRAY() / RETVAL_EMPTY_ARRAY()Nikita Popov2019-05-141-13/+8
| | | | | | | | | | | | The usual wrappers around ZVAL_EMPTY_ARRAY()...
* | | Normalize comments in *nix build system m4 filesPeter Kokot2019-05-121-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | Normalization include: - Use dnl for everything that can be ommitted when configure is built in favor of the shell comment character # which is visible in the output. - Line length normalized to 80 columns - Dots for most of the one line sentences - Macro definitions include similar pattern header comments now
* | | Merge branch 'PHP-7.3' into PHP-7.4Nikita Popov2019-05-092-16/+43
|\ \ \ | |/ /
| * | Merge branch 'PHP-7.2' into PHP-7.3Nikita Popov2019-05-092-20/+45
| |\ \ | | |/
| | * Fixed bug #75186Nikita Popov2019-05-092-21/+45
| | |
* | | Fixed bug #77951Nikita Popov2019-05-092-13/+18
| | | | | | | | | | | | | | | Treat singleton references as non-references in ReflectionReference and return null for them.
* | | Use fast zpp for ReflectionClass constructorNikita Popov2019-05-081-6/+6
| | | | | | | | | | | | | | | At this point zpp overhead makes up a significant part of this function.
* | | Optimize $name/$class property population in reflectionNikita Popov2019-05-081-102/+64
| | | | | | | | | | | | | | | Instead of going through write_property, directly assign to the respective property slot.
* | | Merge branch 'PHP-7.3' into PHP-7.4Nikita Popov2019-04-152-0/+46
|\ \ \ | |/ /
| * | Merge branch 'PHP-7.2' into PHP-7.3Nikita Popov2019-04-152-0/+46
| |\ \ | | |/
| | * Fixed bug #77882Nikita Popov2019-04-152-0/+46
| | |
* | | Remove HAVE_* for always available extensionsGabriel Caruso2019-04-142-2/+0
| | |
* | | Merge branch 'PHP-7.3' into PHP-7.4Nikita Popov2019-03-222-4/+36
|\ \ \ | |/ /
| * | Merge branch 'PHP-7.2' into PHP-7.3Nikita Popov2019-03-222-4/+36
| |\ \ | | |/
| | * Fixed bug #77772Nikita Popov2019-03-222-14/+34
| | |
| | * 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-132-7/+7
| | |
| * | 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
| | |