Closed gsteel closed 2 months ago
@weierophinney
Considerations
I might be missing the point of the
Upload
validator. It looks like something from the days ofLaminas\File\Transfer
andLaminas\Http
.If anyone can shed any light on why it works the way it does, I'm all ears.
Do you have a comment on this?
Closed via #362
RFC
Goal
Remove seeimingly unnecessary validator
Background
There are 2 validators for validating successful upload:
UploadFile
accepts a value toisValid
representing a single file and returns true when the file appears to be successfully uploaded.Upload
requires a list of all uploaded files to its constructor, and subsequent calls toisValid
represent the form element name/key it seems. i.e.isValid('myfile')
It seems odd that
Upload
needs the input as an argument to its constructor (Or option) rather than to theisValid
method.Considerations
I might be missing the point of the
Upload
validator. It looks like something from the days ofLaminas\File\Transfer
andLaminas\Http
.If anyone can shed any light on why it works the way it does, I'm all ears.
Proposal(s)
Deprecate the validator in 2.61.0 and remove it in 3.0.0
cc @laminas/technical-steering-committee
Edit: The
Upload
validator works directly with the$_FILES
super-global š¤¢