-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Form] PropertyPath readValue fails for custom array objects #4535
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
Comments
Looks like this was introduced with c2a243f |
See #4612 |
I'm not totally sure but it seems that this breaks all forms with collections from Doctrine (that was the case where this issue occurred). I consider this as a blocker ... |
Can you please verify whether this is fixed by #4806? |
Commits ------- 1345360 [Form] Fixed PropertyPath handling of offsetGet() that returns a constant value 6e1462e [Form] Fixed PropertyPath handling of __get() method that returns a constant Discussion ---------- [Form] Fixed "Indirect modification.." exceptions in PropertyPath Bug fix: yes Feature addition: no Backwards compatibility break: no Symfony2 tests pass: yes Fixes the following tickets: #4450, #4535?, #4612 Todo: -
This test still fails since you modify a copy of the array in the collection:
It worked with my solution though ... |
I guess you can't fix that while keeping working with the reference - offsetGet of the collection returns a copy of the array ... you need to set it to the modified array - no way of changing it directly ... |
This test is now fixed. Thanks for the feedback! |
Commits ------- e8bb834 [Form] Fixed data to be written back by PropertyPath if it cannot be handled by reference Discussion ---------- [Form] Fixed data to be written back by PropertyPath if it cannot be handled by reference Bug fix: yes Feature addition: no Backwards compatibility break: no Symfony2 tests pass: yes Fixes the following tickets: #4535 Todo: -
the following test fails with current master (add it to PropertyPathTest.php)
There was 1 error:
Indirect modification of overloaded element of Symfony\Component\Form\Tests\Fixtures\CustomArrayObject has no effect
There seems to be a issue that getOffset does not return a reference in PropertyPath.php:375
The text was updated successfully, but these errors were encountered: