doctrine / DoctrineModule

Doctrine Module for Laminas
http://www.doctrine-project.org/projects/doctrine-module.html
MIT License
398 stars 270 forks source link

Allow cleanSearchValue method to accept an integer #818

Closed diego-sorribas closed 10 months ago

diego-sorribas commented 1 year ago

Just to understand, why doesn't the cleanSearchValue method in the ObjectExists validator accept an integer? If the purpose of the method is to verify an entity with a given id.

Line: https://github.com/doctrine/DoctrineModule/blob/6.1.x/src/Validator/ObjectExists.php#L128

driehle commented 1 year ago

I don't feel like there is a valid reason for this. Feel free to provide a PR to allow int here as well.

ekosogin commented 11 months ago

I have the same problem. This method can be used after some filtration (casting to int as example) so without int type backward compatibility from version 5.3 is broken.

TomHAnderson commented 11 months ago

I agree that allowing an int is valid input for this Validator. I'll put this into the next milestone.

driehle commented 10 months ago

Closed with #823