laminas-validator
laminas-validator copied to clipboard
Supported PSR-7 in File\Count validator
Q | A |
---|---|
Documentation | no |
Bugfix | yes |
BC Break | no |
New Feature | no |
RFC | no |
QA | no |
Description
This PR complements previous PR https://github.com/zendframework/zend-validator/pull/251. Recommendation PSR-7 UploadedFileInterface has not been implemented in File / Count validation. At the same time, it improves the https://github.com/laminas/laminas-validator/issues/24 issue.
This PR is same https://github.com/laminas/laminas-validator/pull/109, but upgrade Count path for Actions workflow tests.
I just noted that this package does not depend on psr/http-message
, which is only in require-dev
:
https://github.com/laminas/laminas-validator/blob/23e27edc1520c0bf0c9c7e7f192dd1314677969e/composer.json#L50
I think declaring the dependency, although annoying, would be wise here.
I just noted that this package does not depend on
psr/http-message
, which is only inrequire-dev
:https://github.com/laminas/laminas-validator/blob/23e27edc1520c0bf0c9c7e7f192dd1314677969e/composer.json#L50
I think declaring the dependency, although annoying, would be wise here.
I was going to suggest that too, but it is already listed in suggest
- for the same reasoning we should require everything else too?? I would prefer it that way FWIW, but instanceof
has got our back here right?
but
instanceof
has got our back here right?
Not if a new major version breaks BC there :|
Not if a new major version breaks BC there :|
Good point - tests wouldn't catch that because dev is pinned to ^1
I corrected what came up.
UploadedFileInterface is used in several places in non-test code. https://github.com/laminas/laminas-validator/blob/a995b21d18c63cd1f5d123d0d2cd31a1c2d828dc/src/File/Upload.php#L91 https://github.com/laminas/laminas-validator/blob/a995b21d18c63cd1f5d123d0d2cd31a1c2d828dc/src/File/Upload.php#L134 https://github.com/laminas/laminas-validator/blob/a995b21d18c63cd1f5d123d0d2cd31a1c2d828dc/src/File/Upload.php#L187 https://github.com/laminas/laminas-validator/blob/a995b21d18c63cd1f5d123d0d2cd31a1c2d828dc/src/File/Upload.php#L193 https://github.com/laminas/laminas-validator/blob/a995b21d18c63cd1f5d123d0d2cd31a1c2d828dc/src/File/Upload.php#L262
Yeah, for me, PSR-7 needs to become a hard dependency here...
I'd let @gsteel call the shots here: meanwhile moving to 2.28.x
.
Thanks @icetee 👍