You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the version 6.2.2 of symfony/expression-language the #[Assert\Expression] validation constraint is broken and validation always fails. The issue does appear only in production environment.
How to reproduce
Setup reproducer app:
git clone https://github.com/jbroutier/sf-expression-language-issue
cd sf-expression-language-issue
composer install
php -S 0.0.0.0:8080 -t public
Fill the form again and submit it, validation fails. Removing the cache fixes the issue for another round.
Possible Solution
Likely caused by #48559. As a temporary workaround, reverting symfony/expression-language to version 6.2.0 fixes the issue.
Additional Context
PHP error log:
[Mon Dec 19 16:21:34 2022] PHP Warning: Undefined array key "nodes" in /usr/development/skeleton/vendor/symfony/expression-language/Node/GetAttrNode.php on line 158
[Mon Dec 19 16:21:34 2022] PHP Warning: Undefined array key "attributes" in /usr/development/skeleton/vendor/symfony/expression-language/Node/GetAttrNode.php on line 159
[Mon Dec 19 16:21:34 2022] PHP Warning: Undefined array key "nodes" in /usr/development/skeleton/vendor/symfony/expression-language/Node/GetAttrNode.php on line 158
[Mon Dec 19 16:21:34 2022] PHP Warning: Undefined array key "attributes" in /usr/development/skeleton/vendor/symfony/expression-language/Node/GetAttrNode.php on line 159
[Mon Dec 19 16:21:34 2022] PHP Warning: Undefined array key "type" in /usr/development/skeleton/vendor/symfony/expression-language/Node/GetAttrNode.php on line 70
[Mon Dec 19 16:21:34 2022] PHP Warning: Undefined array key "type" in /usr/development/skeleton/vendor/symfony/expression-language/Node/GetAttrNode.php on line 70
The text was updated successfully, but these errors were encountered:
…ut not __serialize() (fancyweb)
This PR was merged into the 5.4 branch.
Discussion
----------
[VarExporter] Fix exporting classes with __unserialize() but not __serialize()
| Q | A
| ------------- | ---
| Branch? | 5.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | #48706 indirectly
| License | MIT
| Doc PR | -
This is an edge case not supported yet, highlighted by our own symfony/expression-language GetAttrNode class.
Commits
-------
6ccb85e [VarExporter] Fix exporting classes with __unserialize() but not __serialize()
Symfony version(s) affected
6.2.2
Description
When using the version 6.2.2 of
symfony/expression-language
the#[Assert\Expression]
validation constraint is broken and validation always fails. The issue does appear only in production environment.How to reproduce
git clone https://github.com/jbroutier/sf-expression-language-issue cd sf-expression-language-issue composer install php -S 0.0.0.0:8080 -t public
Possible Solution
Likely caused by #48559. As a temporary workaround, reverting
symfony/expression-language
to version 6.2.0 fixes the issue.Additional Context
PHP error log:
[Mon Dec 19 16:21:34 2022] PHP Warning: Undefined array key "nodes" in /usr/development/skeleton/vendor/symfony/expression-language/Node/GetAttrNode.php on line 158
[Mon Dec 19 16:21:34 2022] PHP Warning: Undefined array key "attributes" in /usr/development/skeleton/vendor/symfony/expression-language/Node/GetAttrNode.php on line 159
[Mon Dec 19 16:21:34 2022] PHP Warning: Undefined array key "nodes" in /usr/development/skeleton/vendor/symfony/expression-language/Node/GetAttrNode.php on line 158
[Mon Dec 19 16:21:34 2022] PHP Warning: Undefined array key "attributes" in /usr/development/skeleton/vendor/symfony/expression-language/Node/GetAttrNode.php on line 159
[Mon Dec 19 16:21:34 2022] PHP Warning: Undefined array key "type" in /usr/development/skeleton/vendor/symfony/expression-language/Node/GetAttrNode.php on line 70
[Mon Dec 19 16:21:34 2022] PHP Warning: Undefined array key "type" in /usr/development/skeleton/vendor/symfony/expression-language/Node/GetAttrNode.php on line 70
The text was updated successfully, but these errors were encountered: