df3a7057 | 21-May-2023 |
Nikita Popov |
Add Name::getParts(), deprecate Name::$parts In preparation for switching this to a plain string in PHP-Parser 5, deprecate direct access to the property and provide an API that will
Add Name::getParts(), deprecate Name::$parts In preparation for switching this to a plain string in PHP-Parser 5, deprecate direct access to the property and provide an API that will work on both versions. (cherry picked from commit c9e5a13d68486e9fd75f9be1b4639644e54e7f4f)
show more ...
|
d43edfbb | 21-May-2023 |
Nikita Popov |
Support CRLF newlines in pretty printer Can be enabled using the "newlines" option. |
ad8daa12 | 21-May-2023 |
Nikita Popov |
Normalize newlines in Comment::getReformattedText() Normalize CRLF to LF in getReformattedText(). That was, if the comment is pretty-printed, we will use proper LF newlines, rather t
Normalize newlines in Comment::getReformattedText() Normalize CRLF to LF in getReformattedText(). That was, if the comment is pretty-printed, we will use proper LF newlines, rather than inserting indentation between the CR and LF. At the same time, this also makes it easier to emit actual CRLF newlines with a custom pretty printer. Fixes #599.
show more ...
|
5883189d | 21-May-2023 |
Nikita Popov |
Fix return type of Comment::getReformattedText() |
afe1628a | 21-May-2023 |
Nikita Popov |
Add support for NodeVisitor::REPLACE_WITH_NULL Fixes #716. |
289756d0 | 21-May-2023 |
Nikita Popov |
Gracefully handle non-contiguous arrays in Differ Fixes #909. |
8490c0e8 | 21-May-2023 |
Nikita Popov |
Call leaveNode() on visitors in reverse order Node visitation is now properly nested. The call sequence will now be $visitor1->enterNode($n); $visitor2->enterNode($n
Call leaveNode() on visitors in reverse order Node visitation is now properly nested. The call sequence will now be $visitor1->enterNode($n); $visitor2->enterNode($n); $visitor2->leaveNode($n); $visitor1->leaveNode($n); rather than $visitor1->enterNode($n); $visitor2->enterNode($n); $visitor1->leaveNode($n); $visitor2->leaveNode($n); Fixes #899.
show more ...
|
8bc69824 | 21-May-2023 |
Nikita Popov |
Ensure removing visitor does not leave holes |
fb2c3ac9 | 20-May-2023 |
Nikita Popov |
Fix emulative lexer with default error handler If no error handler is provided, explicitly create one, so we don't end up calling handleError() on null. |
c23976a2 | 20-May-2023 |
Nikita Popov |
Stop accepting strings as types For types the use of a string is ambiguous -- it could be either an Identifier or a Name. Don't guess. Retain the implicit promotion to Identifie
Stop accepting strings as types For types the use of a string is ambiguous -- it could be either an Identifier or a Name. Don't guess. Retain the implicit promotion to Identifier in places where only Identifier is legal, e.g. various symbol names.
show more ...
|
a9dad5c5 | 20-May-2023 |
Nikita Popov |
Fix type of ClassConst::$type |
74caed64 | 20-May-2023 |
Nikita Popov |
Fix labelCharMap for DEL character This map is supposed to have string keys, not integer keys. |
a5d4c100 | 20-May-2023 |
Nikita Popov |
Remove some unused symbols |
93731c5c | 20-May-2023 |
Nikita Popov |
Move constants from NodeTraverser to NodeVisitor These are really part of the NodeVisitor API. Retain aliases for compatibility. |
0a8a333a | 20-May-2023 |
Nikita Popov |
Blacklist test with comments in intersection types |
91da1914 | 20-May-2023 |
Nikita Popov |
Support readonly anonymous classes |
5c267f55 | 20-May-2023 |
Nikita Popov |
Add support for typed constants RFC: https://wiki.php.net/rfc/typed_class_constants |
9a5d5c11 | 20-May-2023 |
Nikita Popov |
Add newline at end of file for many tests Add the newline in reconstructTest() and run updateTests.php, to reduce spurious diffs in the future. |
779b6950 | 20-May-2023 |
Nikita Popov |
Fix coding style |
b68fb76f | 19-May-2023 |
Nikita Popov |
Add makeReadonly() to param builder (cherry picked from commit 11e2dcd96c830ee934fa7b0243f4d67d8a8821ab) |
36a6dcd0 | 06-Mar-2023 |
Cees-Jan Kiewiet |
[5.x] Add constructor property promotion By making flags on the Param builder configurable by providing make(Public|Protected|Private) methods we can promote parameters to properties from th
[5.x] Add constructor property promotion By making flags on the Param builder configurable by providing make(Public|Protected|Private) methods we can promote parameters to properties from the constructor
show more ...
|
bb4263ea | 05-Mar-2023 |
Nikita Popov |
Treat del as label character depending on PHP version In formatting-preserving pretty printing, treat DEL as a label character based on the target PHP version (the default of 7.1 imp
Treat del as label character depending on PHP version In formatting-preserving pretty printing, treat DEL as a label character based on the target PHP version (the default of 7.1 implying it isn't one). This avoids failure to round-trip an unchanged input.
show more ...
|
4ce0de2d | 05-Mar-2023 |
Nikita Popov |
Use PHP 7.1 as default pretty printer target |
a3bc900a | 05-Mar-2023 |
Nikita Popov |
Don't ltrim when preserving formatting We shouldn't ltrim when printing a whole file, that way we will not just fail to preserve formatting, but actually change semantics by dropping
Don't ltrim when preserving formatting We shouldn't ltrim when printing a whole file, that way we will not just fail to preserve formatting, but actually change semantics by dropping meaningful whitespace.
show more ...
|
7785d2b8 | 05-Mar-2023 |
Nikita Popov |
Remove garbage collection section from docs The GC issue has been fixed in PHP 7.3 and is no longer relevant. |