Skip to content
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

Feature request: Add support for PSR7 #43

Closed
michalbundyra opened this issue Jan 15, 2020 · 4 comments
Closed

Feature request: Add support for PSR7 #43

michalbundyra opened this issue Jan 15, 2020 · 4 comments

Comments

@michalbundyra
Copy link
Member

Add support for Psr\Http\Message\UploadedFileInterface for Zend\Validator\File\* validators.


Originally posted by @svycka at zendframework/zend-validator#62

@michalbundyra
Copy link
Member Author

Is there any progress on this already? Till then I have to use the plain $_FILES array for the validators mentioned above.


Originally posted by @BWorld at zendframework/zend-validator#62 (comment)

@michalbundyra
Copy link
Member Author

No progress at this point; feel free to submit a patch if you need it sooner rather than later. 😉


Originally posted by @weierophinney at zendframework/zend-validator#62 (comment)

@michalbundyra
Copy link
Member Author

No problem, $_FILES work as well.

I would like to do some contribution to a framework I have been using for several years now.
Whenever I have time I could look into it, write some tests for it etc.

As the title suggests 'add support' everything should be backward compatible? Could do that and keep all current tests working. Later on when the major version increases we could remove the BC code from the implementation.

Let me know how you think about the BC part.


Originally posted by @BWorld at zendframework/zend-validator#62 (comment)

@dbierer
Copy link

dbierer commented Aug 25, 2021

Shouldn't this issue be closed? It looks like the getFileInfo() method defined in Laminas\Validator\File\FileInformationTrait, used by most of the file validators, already checks to see if the supplied value is an instance of Psr\Http\Message\UploadedFileInterface and extracts the information accordingly. The only thing really missing is that the ability to accept an UploadedFileInterface is not mentioned in the doc block.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants