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

adds support for invoking closures #4501

Merged
merged 1 commit into from
Dec 14, 2024
Merged

adds support for invoking closures #4501

merged 1 commit into from
Dec 14, 2024

Conversation

faizanakram99
Copy link
Contributor

@faizanakram99
Copy link
Contributor Author

@fabpot errors are unrelated

tests/TemplateTest.php Outdated Show resolved Hide resolved
@faizanakram99 faizanakram99 requested a review from fabpot December 12, 2024 14:22
tests/TemplateTest.php Outdated Show resolved Hide resolved
@fabpot
Copy link
Contributor

fabpot commented Dec 12, 2024

Last comment and I think we're good: can you add an item in the CHANGELOG file?

Copy link
Contributor

@nicolas-grekas nicolas-grekas left a comment

Choose a reason for hiding this comment

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

LGTM
I'd suggest opening an issue on php-src also, get_class_methods() should return __invoke to me (and other non static methods BTW).

@faizanakram99
Copy link
Contributor Author

Last comment and I think we're good: can you add an item in the CHANGELOG file?

Done

@faizanakram99
Copy link
Contributor Author

LGTM I'd suggest opening an issue on php-src also, get_class_methods() should return __invoke to me (and other non static methods BTW).

Done php/php-src#17126

Copy link

@lowwa132 lowwa132 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 the PR @faizanakram99

Copy link
Contributor

@fabpot fabpot left a comment

Choose a reason for hiding this comment

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

For PHP 8.0, we need to check that line 1742, we not calling isset($object->$item) for Closure as it does not work.

tests/TemplateTest.php Show resolved Hide resolved
@faizanakram99 faizanakram99 requested a review from fabpot December 12, 2024 18:14
@fabpot
Copy link
Contributor

fabpot commented Dec 14, 2024

Thank you @faizanakram99.

@fabpot fabpot merged commit 918f52e into twigphp:3.x Dec 14, 2024
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Support for closures or at least Closure::__invoke
4 participants