Skip to content

refac: replace AbstractNodeVisitor with NodeVisitorInterface #520

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

Merged

Conversation

gimler
Copy link
Contributor

@gimler gimler commented Apr 16, 2025

Fix deprecation

1x: The "Translation\Bundle\Twig\Visitor\NormalizingNodeVisitor" class extends "Twig\NodeVisitor\AbstractNodeVisitor" that is deprecated since Twig 3.9 (to be removed in 4.0).
|     1x in CheckMissingCommandTest::testReportsMissingTranslations from Translation\Bundle\Tests\Functional\Command
| 
|   1x: The "Translation\Bundle\Twig\Visitor\RemovingNodeVisitor" class extends "Twig\NodeVisitor\AbstractNodeVisitor" that is deprecated since Twig 3.9 (to be removed in 4.0).
|     1x in CheckMissingCommandTest::testReportsMissingTranslations from Translation\Bundle\Tests\Functional\Command
| 
|   1x: The "Translation\Bundle\Twig\Visitor\DefaultApplyingNodeVisitor" class extends "Twig\NodeVisitor\AbstractNodeVisitor" that is deprecated since Twig 3.9 (to be removed in 4.0).
|     1x in CheckMissingCommandTest::testReportsMissingTranslations from Translation\Bundle\Tests\Functional\Command

@gimler gimler force-pushed the feature/nodevisitorinterface branch from 38d2977 to ecd76ba Compare April 16, 2025 10:42
Copy link
Member

@rvanlaak rvanlaak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Composition over inheritance, love it! Thanks

@@ -32,19 +32,16 @@
*
* @author Johannes M. Schmitt <[email protected]>
*/
final class DefaultApplyingNodeVisitor extends AbstractNodeVisitor
final class DefaultApplyingNodeVisitor implements NodeVisitorInterface
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😍

Copy link
Member

@bocharsky-bw bocharsky-bw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thank you!

Do we need a new release so far? Or should we wait for more changes?

@bocharsky-bw bocharsky-bw merged commit 589beee into php-translation:master Apr 22, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants