-
-
Notifications
You must be signed in to change notification settings - Fork 951
Description
Description
While writing custom filters, I have the need for the denormalizePropertyName/normalizePropertyName method.
But currently to have them I have to extends AbstractFilter.
I feel like it would be more useful to have them directly in a trait in doctrine/common, and this trait could be used by both
ApiPlatform\Doctrine\Orm\Filter\AbstractFilter
ApiPlatform\Doctrine\Odm\Filter\AbstractFilter
I thought about adding them to PropertyHelperTrait but it requires adding a property nameConverter to this trait which means
protected ?NameConverterInterface $nameConverter = null,needs to be changed in AbstractFilter to
public function __construct(
...
?NameConverterInterface $nameConverter = null,
) {
$this->nameConverter = $nameConverter;
}
and therefore doctrine/orm & odm package 4.2.9 won't work with 4.2.10 version of doctrine/common ; not sure if it's ok to make such change and add such requirement/conflict between packages
- If someone use the
PropertyHelperTraitAND has a propertynameConverterit will break
The other option would be to introduce a new Trait, but I'm not sure what would be a good name for it, based on the fact the first trait is pretty generic with PropertyHelperTrait... any suggestion @soyuka ?