-
-
Notifications
You must be signed in to change notification settings - Fork 414
[poc] Testing native ContaintsStmts interface #7509
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, composer config:
"extra": {
// ...
"nikic/php-parser": [
],
}
except this line for caching purpose:
https://raw.githubusercontent.com/rectorphp/vendor-patches/main/patches/nikic-php-parser-lib-phpparser-nodetraverser-php.patch
can be removed.
For note: To actually use it, we need to wait for PHPStan new release that consume latest nikic/php-parser that include that feature, then we upping the phpstan/phpstan version. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, in preload.php
and preload-split-package.php
or in bootstrap.php
, we need BC break check:
class_alias(
\PhpParser\Node\ContainsStmts::class,
\Rector\Contract\PhpParser\Node\StmtsAwareInterface::class
);
then remove the actual Rector\Contract\PhpParser\Node\StmtsAwareInterface
class so user that already use it will keep it working :)
Then, create minor
release that note user that the interface
is deprecated.
There is no actual warning in getNodeTypes()
in AbstractRector
is not sub type of Node
interface, so we only got silent skip operation right now.
This is just for testing 👍 |
These lines need to be removed Lines 119 to 133 in 110cbfa
to make installation succeed. Then |
I am thinking that -interface StmtsAwareInterface extends Node
+/** @deprecated use \PhpParser\Node\ContaintsStmts instead */
+interface StmtsAwareInterface extends Node\ContaintsStmts |
@TomasVotruba I will move test error to https://github.com/rectorphp/rector-downgrade-php as related with downgrade rules so this can be green here :) Ref PRs: |
@TomasVotruba please rebase, unit tests should green now 👍 |
59576e4
to
1e31208
Compare
Make use of nikic/PHP-Parser#1113
tests
andrules-tests