Skip to content
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

feat: Twig\Node\Expression\FilterExpression use attribute instate of … #177

Merged

Conversation

gimler
Copy link
Contributor

@gimler gimler commented Sep 30, 2024

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.

Thanks for the link to the change description 👍

Unrelated, but probably we could also fix PhpCsFixer/PHPStan here too?

@@ -83,7 +83,7 @@ private function extractContextFromJoinedFilters(): array
if (!$this->stack[$i] instanceof FilterExpression) {
break;
}
$name = $this->stack[$i]->getNode('filter')->getAttribute('value');
$name = $this->stack[$i]->getAttribute('twig_callable')->getName();
Copy link
Member

Choose a reason for hiding this comment

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

A BC question, will it work for v2? I see we allow "twig/twig": "^2.0 || ^3.0". Or should we bump the twig/twig dependency to allow only v3?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am Not shure but it should. I checked the source code of booth branches.

I can open another pr to fix the cs, because the problems are not related to the changes of this pr.

Copy link
Member

Choose a reason for hiding this comment

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

Please, feel free to open a new PR to fix SA tools fails!

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.

Thank you for this legacy fix!

@bocharsky-bw bocharsky-bw merged commit 42e6fae into php-translation:master Oct 2, 2024
3 of 5 checks passed
@gimler gimler deleted the feature/fix_deprecation branch October 2, 2024 16:30
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