Closed
Description
Symfony version(s) affected
5.4.7
Description
In #45875 a behavior change was introduced.
How to reproduce
Previously the following code worked as expected:
(new ExpressionLanguage)->evaluate('foo matches "/bar/"', ['foo' => null]);
Since version 5.4.7 this now throws a TypeError: Symfony\Component\ExpressionLanguage\Node\BinaryNode::evaluateMatches(): Argument #2 ($str) must be of type string, null given
Possible Solution
If this is considered a bug or a BC break I’m happy to create a pull request to fix this (including a deprecation notice for non-string values I’d assume).
Additional Context
No response