Skip to content

Conversation

cvergne
Copy link
Contributor

@cvergne cvergne commented Jul 17, 2025

As requested in rectorphp/rector#9361, here is a draft Pull Request with :

  • New fixture for the case with a static method from an other class in the file
  • Updated fixtures for the valid case to remove the extends of AbstractExtension

@cvergne cvergne force-pushed the fix/822-GetFunctionsToAsTwigFunctionAttributeRector branch from 79aa083 to 5d786b3 Compare July 17, 2025 14:46
{
return [
new \Twig\TwigFunction('some_function', [DifferentClass::class, 'someFunction']),
new \Twig\TwigFunction('some_function', $this->someFunction(...)),
Copy link
Member

Choose a reason for hiding this comment

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

this part is fine, the one that skipped is Different::class

Copy link
Member

Choose a reason for hiding this comment

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

Oh, I see, as not all changed, this should be skipped.

@samsonasik
Copy link
Member

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