Skip to content

Conversation

@tcoch
Copy link
Contributor

@tcoch tcoch commented Nov 10, 2025

It's a silly little patch, but really improves the readability of the error message IMO ...

@GromNaN
Copy link
Contributor

GromNaN commented Nov 11, 2025

Well spotted!
You have to update the expected message in tests:

['{{ array_access.a }}', 'Neither the property "a" nor one of the methods "a()", "geta()"/"isa()"/"hasa()" or "__call()" exist and have public access in class "Twig\Tests\TemplateArrayAccessObject" in "%s" at line 1.'],
['{% from _self import foo %}{% macro foo(obj) %}{{ obj.missing_method() }}{% endmacro %}{{ foo(array_access) }}', 'Neither the property "missing_method" nor one of the methods "missing_method()", "getmissing_method()"/"ismissing_method()"/"hasmissing_method()" or "__call()" exist and have public access in class "Twig\Tests\TemplateArrayAccessObject" in "%s" at line 1.'],

@fabpot
Copy link
Contributor

fabpot commented Nov 15, 2025

Thank you @tcoch.

@fabpot fabpot merged commit 35a3de7 into twigphp:3.x Nov 15, 2025
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.

3 participants