Skip to content

Update Fixtures for GetFunctionsToAsTwigFunctionAttributeRector#823

Closed
cvergne wants to merge 1 commit intorectorphp:mainfrom
cvergne:fix/822-GetFunctionsToAsTwigFunctionAttributeRector
Closed

Update Fixtures for GetFunctionsToAsTwigFunctionAttributeRector#823
cvergne wants to merge 1 commit intorectorphp:mainfrom
cvergne:fix/822-GetFunctionsToAsTwigFunctionAttributeRector

Conversation

@cvergne
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Member

Spea pushed a commit to rebuy-de/rector-symfony that referenced this pull request Oct 24, 2025
…tFunctionsToAsTwigFunctionAttributeRector (rectorphp#846)

* Update Fixtures for GetFunctionsToAsTwigFunctionAttributeRector

* Closes rectorphp#823 Fixes rectorphp/rector#9361

* skip whole

* fix

* fix

* fix

---------

Co-authored-by: Christophe VERGNE <christophe.vergne@gmail.com>
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