History log of /PHP-Parser/ (Results 276 – 300 of 1692)
Revision (<<< Hide revision tags) (Show revision tags >>>)Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
1f504d2c07-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 ...

c55c7a2a07-Aug-2022 Anton

Add json and ctype as required extensions in composer.json (#864)

9ef528f307-Aug-2022 Anton

ParserAbstract: remove undefined class in `use`

Class `PhpParser\Parser\Tokens` not exists in current version

e61bb11924-Jul-2022 Nikita Popov

Add additional upgrading notes for pretty printer

cf0cd60024-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.

646b490724-Jul-2022 Nikita Popov

Don't force newline after doc string when targeting PHP >= 7.3

c218db3e23-Jul-2022 Nikita Popov

Add additional test case for assignment precedence

This is a case where the parentheses around the assignment *are*
important.

84813dc123-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.

59145a4423-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.

7bf6348223-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.

a73c8ee023-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 ...

1e89658c23-Jul-2022 Nikita Popov

Add PhpVersion class

050342b504-Jul-2022 MathiasReker

Add visibility modifiers to constants

Closes GH-848.

a3f2bb6321-Jul-2022 Anton

Add __serialize/__unserialize to ClassMethod::$magicNames

de4ac93004-Jul-2022 MathiasReker

Single blank line at eof

A PHP file without end tag must always end with a single empty line feed.

4021a63c04-Jul-2022 MathiasReker

No superfluous elseif

Replaces superfluous elseif with if.

653757be04-Jul-2022 MathiasReker

Nullable type declaration for default null value

Adds ? before type declarations for parameters with a default null value

572af7ff04-Jul-2022 MathiasReker

No unused imports

Unused use statements must be removed.

0086a26104-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).

5aae65e619-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.

0ea134a519-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.

a38a60b719-Jun-2022 Nikita Popov

Move Tokens::T_* to Php7::T_*

Drop the separate tokens class, move them into the parser.

c878d71919-Jun-2022 Nikita Popov

Move token mapping from lexer to parser

This allows a different token mapping per parser.

6e0eec8019-Jun-2022 Nikita Popov

Move definition of compatibility tokens into separate file

71ed641c19-Jun-2022 Nikita Popov

Handle true/false/null types in builder APIs

1...<<11121314151617181920>>...68