History log of /PHP-Parser/test/PhpParser/CodeParsingTest.php (Results 1 – 25 of 30)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# d57da64d 31-May-2024 Jorg Adam Sowa

Add missing void return types (#997)


# 5edc190b 23-Sep-2023 Nikita Popov

Add support for dumping additional attributes


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


# c48ee36f 09-Jul-2023 Nikita Popov

Allow passing visitors to NodeTraverser constructor


# a5033e38 29-Aug-2022 Nikita Popov

Format tests as well

The unnecessary parentheses for "new" are a bit annoying, but I
can live with it...


# 646b4907 24-Jul-2022 Nikita Popov

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


# 1e89658c 23-Jul-2022 Nikita Popov

Add PhpVersion class


# 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


# c758510a 09-Jul-2021 Nikita Popov

Add support for PHP 8.1

With the introduction of intersection types, PHP now lexes the
token '&' either as T_AMPERSAND_(NOT_)FOLLOWED_BY_VAR_OR_VARARG.
This completely breaks parsing

Add support for PHP 8.1

With the introduction of intersection types, PHP now lexes the
token '&' either as T_AMPERSAND_(NOT_)FOLLOWED_BY_VAR_OR_VARARG.
This completely breaks parsing of any code containing '&'.

Fix this by canonicalizing to the new token format (unconditionally,
independent of emulation) and adjusting the parser to use the two
new tokens.

This doesn't add actual support for intersection types yet.

show more ...


Revision tags: v4.3.0, v4.2.5, v4.2.4, v4.2.3, v4.2.2, v4.2.1
# b7e63615 19-Jan-2019 Lars Moelleken

updates via "rectorphp/rector" (#573)

- "global" -> remove unused "use" statements
- "phpunit" -> fix "@covers" comments
- "phpunit" -> replace "->will($this->returnValue()" with "->

updates via "rectorphp/rector" (#573)

- "global" -> remove unused "use" statements
- "phpunit" -> fix "@covers" comments
- "phpunit" -> replace "->will($this->returnValue()" with "->willReturn()"
- "UseTest.php" -> add missing namespace
- "composer.json" -> use "autoload-dev"
- remove -> "require_once" usage in the tests (use autoload-dev via composer.json)

-> most of the changes are done automatically by "https://github.com/rectorphp/rector"

show more ...


Revision tags: v4.2.0, v4.1.1, v4.1.0, v4.0.4
# 3e02eb71 22-Jul-2018 Nikita Popov

Fix updateTests.php


Revision tags: v4.0.3, v4.0.2, v4.0.1, v4.0.0, v3.1.5, v4.0.0beta1, v3.1.4
# 5285df8f 13-Jan-2018 Nikita Popov

[CS] Use elseif instead of else if

Conflicts:
lib/PhpParser/TokenStream.php


Revision tags: v4.0.0alpha3, v3.1.3, v4.0.0alpha2
# 457fe049 04-Nov-2017 Nikita Popov

Ensure nodes have full complement of location info


Revision tags: v3.1.2
# b58157f0 02-Nov-2017 TomasVotruba

add strict_types to tests + fix explode type


Revision tags: v4.0.0alpha1, v3.1.1
# af128074 13-Aug-2017 TomasVotruba

[cs] apply same to tests


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

Always use Identifier nodes

The parser will now always generate Identifier nodes (for
non-namespaced identifiers). This obsoletes the useIdentifierNodes
parser option.

Node

Always use Identifier nodes

The parser will now always generate Identifier nodes (for
non-namespaced identifiers). This obsoletes the useIdentifierNodes
parser option.

Node constructors still accepts strings and will implicitly create
an Identifier wrapper. Identifier implement __toString(), so that
outside of strict-mode many things continue to work without changes.

show more ...


Revision tags: v3.0.5, v3.0.4, v3.0.3
# 48d3243a 19-Jan-2017 Nikita Popov

Drop last vestiges of consistent var mode flag


# b0c96291 19-Jan-2017 Nikita Popov

Add test porting infrastructure


# 1bfbd7bc 19-Jan-2017 Nikita Popov

Make useExpressionStatement only supported mode


# 9b2d35d1 24-Dec-2016 Nikita Popov

Add expression statement mode


# a947e731 22-Dec-2016 Nikita Popov

Add useConsistentVariableNodes mode

The parameter case is a bit weird, because the subnode is called
"name" here, rather than "var". Nothing we can do about that in
this version thou

Add useConsistentVariableNodes mode

The parameter case is a bit weird, because the subnode is called
"name" here, rather than "var". Nothing we can do about that in
this version though.

The two parser options might be merged. I've kept it separate,
because I think this variable representation should become the
default (or even only representation) in the future, while I'm
less sure about the Identifier thing.

show more ...


# 6bcc6c31 22-Dec-2016 Nikita Popov

Add useIdentifierNodes mode to parser

In this mode non-namespaced names that are currently represented
using strings will be represented using Identifier nodes instead.
Identifier no

Add useIdentifierNodes mode to parser

In this mode non-namespaced names that are currently represented
using strings will be represented using Identifier nodes instead.
Identifier nodes have a string $name subnode and coerce to string.

This allows preserving attributes and in particular location
information on identifiers.

show more ...


Revision tags: v3.0.2, v3.0.1, v3.0.0
# bcdfb703 23-Nov-2016 Nikita Popov

Cleanup imports

Thanks PhpStorm :)


# 098294be 23-Nov-2016 Nikita Popov

Support !!positions parser test mode

And use it for the group use prefix position test that was
previously implemented as a separate test.


12