1f504d2c | 07-Aug-2022 |
Nikita Popov |
Don't trim in Comment::getReformattedText() In the past, single-line comments were stored together with the trailing newline. Later we switched to the PHP8 comment representation, wh
Don't trim in Comment::getReformattedText() In the past, single-line comments were stored together with the trailing newline. Later we switched to the PHP8 comment representation, where the trailing newline is not part of the comment anymore. As such, there is also no need to trim here. This is split out from GH-867.
show more ...
|
c55c7a2a | 07-Aug-2022 |
Anton |
Add json and ctype as required extensions in composer.json (#864) |
9ef528f3 | 07-Aug-2022 |
Anton |
ParserAbstract: remove undefined class in `use` Class `PhpParser\Parser\Tokens` not exists in current version |
e61bb119 | 24-Jul-2022 |
Nikita Popov |
Add additional upgrading notes for pretty printer |
cf0cd600 | 24-Jul-2022 |
Nikita Popov |
Improve heuristic for escaping in single quoted strings It is idiomatic to not escape backslashes if they are followed by a non-special character. |
646b4907 | 24-Jul-2022 |
Nikita Popov |
Don't force newline after doc string when targeting PHP >= 7.3 |
c218db3e | 23-Jul-2022 |
Nikita Popov |
Add additional test case for assignment precedence This is a case where the parentheses around the assignment *are* important. |
84813dc1 | 23-Jul-2022 |
Nikita Popov |
Avoid repeatedly downloading archive in run-php-src.sh When doing local testing, chances are that the archive is already present. |
59145a44 | 23-Jul-2022 |
Nikita Popov |
Treat assignments as unary operators Assignment expressions can be viewed as unary operators where the whole "$x =" part is the operator. |
7bf63482 | 23-Jul-2022 |
Nikita Popov |
Remove inc/dec from precedence map Inc/dec are primitive expressions that only accept a variable operand, rather than a general expression operand. |
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 |
050342b5 | 04-Jul-2022 |
MathiasReker |
Add visibility modifiers to constants Closes GH-848. |
a3f2bb63 | 21-Jul-2022 |
Anton |
Add __serialize/__unserialize to ClassMethod::$magicNames |
de4ac930 | 04-Jul-2022 |
MathiasReker |
Single blank line at eof A PHP file without end tag must always end with a single empty line feed. |
4021a63c | 04-Jul-2022 |
MathiasReker |
No superfluous elseif Replaces superfluous elseif with if. |
653757be | 04-Jul-2022 |
MathiasReker |
Nullable type declaration for default null value Adds ? before type declarations for parameters with a default null value |
572af7ff | 04-Jul-2022 |
MathiasReker |
No unused imports Unused use statements must be removed. |
0086a261 | 04-Jul-2022 |
MathiasReker |
Short scalar cast Cast (boolean) and (integer) should be written as (bool) and (int), (double) and (real) as (float), (binary) as (string). |
5aae65e6 | 19-Jun-2022 |
Nikita Popov |
Add Parser::getLexer() method Not sure if this is going to stick, but for now this makes it easier to obtain the Lexer instance when creating the parser via ParserFactory. |
0ea134a5 | 19-Jun-2022 |
Nikita Popov |
Add PHP 8 parser with correct concatenation precedence The PHP 7 and PHP 8 parsers use the same grammar file and only differ in token precedence. |
a38a60b7 | 19-Jun-2022 |
Nikita Popov |
Move Tokens::T_* to Php7::T_* Drop the separate tokens class, move them into the parser. |
c878d719 | 19-Jun-2022 |
Nikita Popov |
Move token mapping from lexer to parser This allows a different token mapping per parser. |
6e0eec80 | 19-Jun-2022 |
Nikita Popov |
Move definition of compatibility tokens into separate file |
71ed641c | 19-Jun-2022 |
Nikita Popov |
Handle true/false/null types in builder APIs |