Conversation
|
I think this should be a generic solution, not just for this specific extension. It also feels similar to this problem I tried to solve: #4124 |
|
In the meantime, that seems legit to me. @fabpot? |
It already works for core extension, {{ obj }} is casted into string |
|
For reminder, this PR is about
{{ html_classes(class_a, {
(stringableObjectThatMightBeConvertedToAClass): true
}) }}Which currently throws exception. Can you please take a closer look at it? 🙏 |
|
I must be missing something here, but even without your patch, the new test passes. See #4506 where I've added your test without changing the code. |
|
Sorry, the test case was the wrong one. You should get an error in the current code with: {{ html_classes(stringableObjectThatMightBeConvertedToAClass) }}The test fixtures have been updated accordingly. |
Co-authored-by: Fabien Potencier <fabien@potencier.org>
|
Thank you @nlemoine. |
No description provided.