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
{{ message }}
This repository has been archived by the owner on Jun 14, 2023. It is now read-only.
This upgrade for me resulted in errors on filters with a custom apply_filter. The error occurs when the filterform was submitted.
Neither the property "activePowerup" nor one of the methods
"addActivePowerup()"/"removeActivePowerup()", "setActivePowerup()", "activePowerup()",
"__set()" or "__call()" exist and have public access in class
"Acme\DemoBundle\Entity\User\Editor".
It seems like the bundle still tries to set/get the specific property of that entity, which it didn't do that before. The documentation states the following about ignoring getter/setter:
If you wish the field to be ignored when reading or writing to the object you can set the
property_path option to false, but using property_path for this purpose is deprecated, you
should use the mapped option.
Hi, I did not get this kind of error but I supposed its because of I don't use any data class on my filter types. But the error you get make me think to this issue #95. Does the activePowerup field is a relation ?
My activePowerup field is of the type filter_boolean with a custom apply_filter method:
->add('activePowerup', 'filter_boolean', array(
'apply_filter' => function (ORMQuery$filterBuilder, $field, $values) {
if (!empty($values['value']) && $values['value'] == BooleanFilterType::VALUE_YES) {
$filterBuilder->getQueryBuilder()->leftJoin('e.powerups', 'p');
$filterBuilder->getQueryBuilder()->andWhere('p.dateFinished > CURRENT_TIMESTAMP()');
}
},
'mapped' => false, // Mapping this field to the entity will result in an error
))
On June 1 a new mayor version of Symfony was released. The way how
PropertyAccess
works was changed.https://github.com/symfony/symfony/blob/master/CHANGELOG-2.5.md
This upgrade for me resulted in errors on filters with a custom
apply_filter
. The error occurs when the filterform was submitted.It seems like the bundle still tries to set/get the specific property of that entity, which it didn't do that before. The documentation states the following about ignoring getter/setter:
http://symfony.com/doc/current/reference/forms/types/form.html
Setting
mapped => false
in my FilterType solved this for me.The text was updated successfully, but these errors were encountered: