#
caf54044 |
| 13-Jul-2024 |
Nikita Popov |
Declare PHP 8.4 as the newest supported version As the comment indicates, this includes partially supported versions. PHP-Parser includes support for all parts of PHP 8.4 that have l
Declare PHP 8.4 as the newest supported version As the comment indicates, this includes partially supported versions. PHP-Parser includes support for all parts of PHP 8.4 that have landed in php-src.
show more ...
|
#
ec026134 |
| 01-Mar-2024 |
Maarten Buis |
Update `PhpVersion::getNewestSupported()` to PHP 8.3
|
#
d8e80653 |
| 23-Sep-2023 |
Nikita Popov |
Don't parse unicode escapes for PHP < 7.0 We still had the option for this but were hardcoding it to true. Make it conditional on the PHP version instead.
|
#
502b0909 |
| 16-Aug-2023 |
Nikita Popov |
Add property types Types omitted in two places where we violate them currently: Namespace_::$stmts can be null during parsing, and Enum_::$scalarType can be a complex type for invali
Add property types Types omitted in two places where we violate them currently: Namespace_::$stmts can be null during parsing, and Enum_::$scalarType can be a complex type for invalid programs.
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 ...
|
#
cb60eda7 |
| 26-Feb-2023 |
Nikita Popov |
Support yield precedence Since PHP 7.0 yield is a proper expression, so print it with proper precedence. If the pretty printer is configured for older version (non-default), then alw
Support yield precedence Since PHP 7.0 yield is a proper expression, so print it with proper precedence. If the pretty printer is configured for older version (non-default), then always print parentheses. There is an interesting interaction here, in that => is resolved in favor of yield if the yield occurs as part of an array (or outer yield). This kind of bypasses the entire precedence hierarchy and *only* affects yield expressions. For the sake of simplicity this is modeled via normal LHS precedence, because this will only add unnecessary parentheses to a handful of low precedence unary operators. If desired, a special marker for this purpose could be added though.
show more ...
|
#
9857581e |
| 29-Aug-2022 |
Anton |
Add array/callable to BUILTIN_TYPE_VERSIONS Listing these is not strictly necessary, in that array/callable are keywords, and as such don't use the relevant code path. We can still i
Add array/callable to BUILTIN_TYPE_VERSIONS Listing these is not strictly necessary, in that array/callable are keywords, and as such don't use the relevant code path. We can still include them for the sake of completeness. Closes #872.
show more ...
|
#
68fc1ba4 |
| 28-Aug-2022 |
Nikita Popov |
Always use List_ node for array destructuring Fixes #471.
|
#
652fb0c6 |
| 07-Aug-2022 |
Nikita Popov |
Print trailing comma in param list if supported
|
#
646b4907 |
| 24-Jul-2022 |
Nikita Popov |
Don't force newline after doc string when targeting PHP >= 7.3
|
#
a73c8ee0 |
| 23-Jul-2022 |
Nikita Popov |
Add a phpVersion option to the pretty printer This is currently just used to initialize the default for short array syntax. The default target version in 7.0, which also means t
Add a phpVersion option to the pretty printer This is currently just used to initialize the default for short array syntax. The default target version in 7.0, which also means that the default for short arrays is flipped to on.
show more ...
|
#
1e89658c |
| 23-Jul-2022 |
Nikita Popov |
Add PhpVersion class
|