History log of /PHP-Parser/lib/PhpParser/ParserFactory.php (Results 1 – 19 of 19)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 3640d18b 12-Nov-2023 Nikita Popov

Remove ParserFactory::create()

Don't try to keep backwards-compatibility with the old factory
style, which doesn't map cleanly onto supported options (we only
have ONLY_PHP7/PREFER_P

Remove ParserFactory::create()

Don't try to keep backwards-compatibility with the old factory
style, which doesn't map cleanly onto supported options (we only
have ONLY_PHP7/PREFER_PHP7, which should probably create a Php8
parser in terms of how they are used, but this would no longer
match their names).

Instead, I have backported the new createForNewestSupportedVersion()
and createForHostVersion() methods to PHP-Parser 4.

show more ...


# 2d3dd4e2 17-Sep-2023 Nikita Popov

Don't align phpdoc tags

I did this to start with, but then alignment kept being broken
during refactorings, and at some point I switched to not aligning,
and now we have a big mess.

Don't align phpdoc tags

I did this to start with, but then alignment kept being broken
during refactorings, and at some point I switched to not aligning,
and now we have a big mess.

Add a php-cs-fixer rule to consistently not align phpdoc tags.

show more ...


# 4b497045 29-Jul-2023 Nikita Popov

Move attribute handling into parser

The Lexer now only provides the tokens to the parser, while the
parser is responsible for determining which attributes are placed
on notes. This o

Move attribute handling into parser

The Lexer now only provides the tokens to the parser, while the
parser is responsible for determining which attributes are placed
on notes. This only needs to be done when the attributes are
actually needed, rather than for all tokens.

This removes the usedAttributes lexer option (and lexer options
entirely). The attributes are now enabled unconditionally. They
have less overhead now, and the need to explicitly enable them for
some use cases (e.g. formatting-preserving printing) doesn't seem
like a good tradeoff anymore.

There are some additional changes to the Lexer interface that
should be done after this, and the docs / upgrading guide haven't
been adjusted yet.

show more ...


# f98341f6 17-Sep-2022 Nikita Popov

Specify more types


# dd63ddbc 28-Aug-2022 Nikita Popov

Add php-cs-fixer config and reformat

The formatting in this project has become something of a mess,
because it changed over time. Add a CS fixer config and reformat
to the desired st

Add php-cs-fixer config and reformat

The formatting in this project has become something of a mess,
because it changed over time. Add a CS fixer config and reformat
to the desired style, which is PSR-12, but with sane brace placement.

show more ...


# 1e89658c 23-Jul-2022 Nikita Popov

Add PhpVersion class


# 050342b5 04-Jul-2022 MathiasReker

Add visibility modifiers to constants

Closes GH-848.


# 653757be 04-Jul-2022 MathiasReker

Nullable type declaration for default null value

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


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


# 55f29b15 12-Jun-2022 Nikita Popov

Improve ParserFactory version targeting

Most users will want to pick createForNewestSupportedVersion()
or getForHostVersion(). The currently default is the former,
which can lead to

Improve ParserFactory version targeting

Most users will want to pick createForNewestSupportedVersion()
or getForHostVersion(). The currently default is the former,
which can lead to unwanted surprised due to PHP BC breaks for
users that actually want the latter. Make this choice more
explicit.

show more ...


# d3d1297c 06-Jun-2022 Nikita Popov

Remove PHP 5 parser


Revision tags: v4.3.0, v4.2.5, v4.2.4, v4.2.3, v4.2.2, v4.2.1, v4.2.0, v4.1.1, v4.1.0, v4.0.4, v4.0.3, v4.0.2, v4.0.1, v4.0.0, v3.1.5, v4.0.0beta1, v3.1.4
# 7f72c841 10-Jan-2018 Gabriel Caruso

[CS] Open class brackets in new line


Revision tags: v4.0.0alpha3, v3.1.3, v4.0.0alpha2, v3.1.2, v4.0.0alpha1, v3.1.1
# e2e99f26 18-Aug-2017 TomasVotruba

Add strict_types to lib code


# ec535ea1 13-Aug-2017 TomasVotruba

[cs] use PHP 5.4 short array, since PHP 7.0 is min version


Revision tags: v3.1.0, v3.0.6
# a32e3797 28-Apr-2017 Nikita Popov

Generate PHP 7 type annotations


Revision tags: v3.0.5, v3.0.4, v3.0.3, v3.0.2, v3.0.1, v3.0.0, v3.0.0beta2, v3.0.0beta1, v2.1.1, v3.0.0alpha1, v2.1.0, v2.0.1, v2.0.0, v2.0.0beta1, v1.4.1, v2.0.0alpha1
# 2496cd38 14-Jul-2015 Nikita Popov

Various docs fixes


Revision tags: v1.4.0
# 5bd8cb84 12-Jul-2015 Nikita Popov

Add dummy ParserFactory test

:/


# f2b7a315 20-Jun-2015 Nikita Popov

Rename ParserInterface to Parser

And drop the alias of Parser to Parser\Php5.


# 813c9f15 20-Jun-2015 Nikita Popov

Add basic ParserFactory