-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Mention the adder/remover support of PropertyInfo #9195
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
Conversation
Perfect. Thank you very much for documenting this @javiereguiluz! |
After a second check, I think that the property will be considered writable if it has associated adder and remover methods. If only one of them is present, the PropertyAccessor component cannot update reliably the array, and so doesn't do it. Should be: <?php
<?php
class SomeClass
{
private $analyses;
private $feet;
public function addAnalyse(Dummy $analyse)
{
// ...
}
public function removeAnalyse(Dummy $analyse)
{
// ...
}
public function addFoot(Dummy $foot)
{
// ...
}
public function removeFoot(Dummy $foot)
{
// ...
}
} |
Thanks for reviewing Kévin. This is a bit confusing, because I took the original example from the tests of your pull request: https://github.com/symfony/symfony/pull/18337/files#diff-cf4f68ffc8f26be7f990461bb282f50cR126 |
I have checked this again and you are right ... it checks by default both array mutator methods (add and remove) to determine if it's writable or not. Thanks! |
* 3.4: (21 commits) added Sam in the core team minor symfony#9494 [Console] Change use statement for Process Helper (krizon) Specify how provide a high availability Use FQCN as service ID [symfony#8847] fix another directive [symfony#8847] fix tip directive Describe reliability in Lock Propose identical comparison [symfony#9195] fix a minor typo Fixed some variable names fix some security config examples Made explicit testing dependencies No more ambiguity on prod mode Mention the adder/remover support of PropertyInfo ...
* 4.0: (24 commits) added Sam in the core team minor symfony#9494 [Console] Change use statement for Process Helper (krizon) Specify how provide a high availability fixing format + language Documenting make:controller and make:crud Use FQCN as service ID Describe reliability in Lock Propose identical comparison [symfony#9195] fix a minor typo Fixed some variable names fix some security config examples Made explicit testing dependencies ...
This fixes #7182.