History log of /PHP-Parser/test/PhpParser/NodeTraverserTest.php (Results 1 – 25 of 40)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# daaadc3b 03-Jun-2024 Jorg Adam Sowa

Adjust tests to be compatible with PHPUnit 10 (#998)

This avoids warnings on PHPUnit 10, without actually
switching to PHPUnit 10.


# d57da64d 31-May-2024 Jorg Adam Sowa

Add missing void return types (#997)


# c48ee36f 09-Jul-2023 Nikita Popov

Allow passing visitors to NodeTraverser constructor


# afe1628a 21-May-2023 Nikita Popov

Add support for NodeVisitor::REPLACE_WITH_NULL

Fixes #716.


# 8490c0e8 21-May-2023 Nikita Popov

Call leaveNode() on visitors in reverse order

Node visitation is now properly nested. The call sequence will
now be

$visitor1->enterNode($n);
$visitor2->enterNode($n

Call leaveNode() on visitors in reverse order

Node visitation is now properly nested. The call sequence will
now be

$visitor1->enterNode($n);
$visitor2->enterNode($n);
$visitor2->leaveNode($n);
$visitor1->leaveNode($n);

rather than

$visitor1->enterNode($n);
$visitor2->enterNode($n);
$visitor1->leaveNode($n);
$visitor2->leaveNode($n);

Fixes #899.

show more ...


# 8bc69824 21-May-2023 Nikita Popov

Ensure removing visitor does not leave holes


# 93731c5c 20-May-2023 Nikita Popov

Move constants from NodeTraverser to NodeVisitor

These are really part of the NodeVisitor API. Retain aliases for
compatibility.


# 9b5a2c89 11-Sep-2022 Nikita Popov

Use PHPStan level 5


# a3b0541c 03-Sep-2022 Nikita Popov

Support array return from enterNode()

This uses the same semantics as arrays from leaveNode(), i.e. the
returned nodes will not be visited by other visitors. This is open
to change t

Support array return from enterNode()

This uses the same semantics as arrays from leaveNode(), i.e. the
returned nodes will not be visited by other visitors. This is open
to change though (but probably should change for both enterNode()
and leaveNode() if it does change?)

show more ...


# c42290ae 03-Sep-2022 Nikita Popov

Support REMOVE_NODE from enterNode()


# 23835d20 03-Sep-2022 Nikita Popov

Rename Scalar\LNumber to Scalar\Int_


# 66b20bd6 03-Sep-2022 Nikita Popov

Rename Scalar\DNumber to Scalar\Float_


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


# f6bf0415 08-Aug-2020 Nikita Popov

Remove last uses of MockBuilder


# 1bf073a7 08-Aug-2020 Nikita Popov

Avoid most MockBuilder uses in NodeVisitor testing

This removes all the warnings about at() usage ... even though
it is still used. Apparently warnings don't get emitted if the
at()

Avoid most MockBuilder uses in NodeVisitor testing

This removes all the warnings about at() usage ... even though
it is still used. Apparently warnings don't get emitted if the
at() usage is inside a data provider?

show more ...


Revision tags: v4.3.0, v4.2.5, v4.2.4, v4.2.3
# 9484baf8 23-Jun-2019 Nikita Popov

Make compatible with PhpUnit 8


Revision tags: 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
# dc323458 08-Oct-2018 Maks Rafalko

Add new constant to be returned from enterNode() to not traverse current and child nodes (#536)

* Add new constant to be returned from enterNode() to not travers current node for subsequent

Add new constant to be returned from enterNode() to not traverse current and child nodes (#536)

* Add new constant to be returned from enterNode() to not travers current node for subsequent visitors and skip children traversing

* Allow visitors to replace nodes in leaveNode() when DONT_TRAVERSE_CURRENT_AND_CHILDREN is used

show more ...


# d638dd9b 22-Sep-2018 Tomáš Votruba

Use methods instead of annotations for expected exceptions (#533)


Revision tags: v4.0.4, v4.0.3, v4.0.2, v4.0.1
# 6aba7624 03-Mar-2018 Nikita Popov

Add replacement sanity check in traverser


Revision tags: v4.0.0, v3.1.5, v4.0.0beta1, v3.1.4
# c7ada124 13-Jan-2018 Nikita Popov

[CS] Use ::class notation instead of string

Conflicts:
test/PhpParser/ParserFactoryTest.php
test/PhpParser/ParserTest.php


Revision tags: v4.0.0alpha3, v3.1.3, v4.0.0alpha2, 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
# bc0bff3f 03-Jun-2017 Nikita Popov

Fix method name in tests


# 3c44785e 27-Apr-2017 Ekin

Bump phpunit version (#381)


12