Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[symfony 7.3] Add GetFiltersToAsTwigFilterAttributeRector to migrate #[TwigFilter] #761

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
merged 1 commit into from
May 9, 2025

Conversation

TomasVotruba
Copy link
Member

No description provided.

@TomasVotruba TomasVotruba merged commit 4bc47c0 into main May 9, 2025
5 checks passed
@TomasVotruba TomasVotruba deleted the tv-twig-attribute branch May 9, 2025 06:13
@@ -8,4 +8,5 @@

return static function (RectorConfig $rectorConfig): void {
$rectorConfig->import(__DIR__ . '/symfony73/symfony73-console.php');
$rectorConfig->import(__DIR__ . '/symfony73/symfony73-twig-bundle.php');
Copy link
Member

Choose a reason for hiding this comment

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

this needs to be registered in Symfony7SetProvider as well below this:

new ComposerTriggeredSet(
SetGroup::SYMFONY,
'symfony/console',
'7.3',
__DIR__ . '/../../../config/sets/symfony/symfony7/symfony73/symfony73-console.php'
),
];

Copy link
Member

@samsonasik samsonasik May 9, 2025

Choose a reason for hiding this comment

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

Comment on lines +136 to +138
if ($secondArg->value instanceof MethodCall && $secondArg->value->isFirstClassCallable()) {
throw new ShouldNotHappenException('Not supported yet');
}
Copy link
Member

Choose a reason for hiding this comment

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

the syntax seems should be:

new \Twig\TwigFilter('some_filter', $this->localMethod(...)),

I will look into it

Copy link
Member

Choose a reason for hiding this comment

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

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.

2 participants