Skip to content

Conversation

@t-sakaguchi77
Copy link

Hello!

In raising this pull request, I confirm the following:

  • I have read and understood the Contributing Guidelines
  • I have checked that another pull request for this purpose does not exist
  • I wrote some tests for this PR
  • I have updated the relevant CHANGELOG
  • I have created a PR for the documentation about this change

Small description of change:

This PR implements the ignoreCheckUploadedFile option in the File validator, allowing
developers to bypass the internal is_uploaded_file() check. This option is particularly
useful when mocking uploaded files in unit tests.

Additionally, when ignoreCheckUploadedFile is set to true, empty upload arrays
(e.g. []) are now treated as valid rather than causing a validation failure.

This update improves testability while maintaining backwards compatibility.
A unit test has been added to verify this behavior.

Note: I did not update the CHANGELOG because Phalcon maintainers usually handle it on merge.
If it is preferred that contributors update it, I’m happy to add it.

Thanks

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants