Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

PSR-7 file upload parameter naming consistency. #82

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

alextech
Copy link
Contributor

@alextech alextech commented Dec 19, 2018

  • Is this related to quality assurance?
  • Is this related to documentation?
    Upgrading my setup to released version of PSR-7 UploadedFile compatibility for RenameUpload filter #70 caused some confusion. Updating parameter to help resolve it, and suggest a documentation edit to explain where the instances could come from, as I couldn't figure it out without looking at the diff changes of previous PR refactorings.

Add missing unit tests for new options.

@alextech alextech changed the title Feature/psr uploadfile PSR-7 file upload parameter naming consistency. Dec 19, 2018
Copy link
Member

@froschdesign froschdesign left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is correct that there are an inconsistency between the naming of the PSR-7 interfaces for file uploads and the RenameUpload filter., but your changes introduces an inconsistency between the option and method name in the filter.
This should be solved without a BC break.

docs/book/file.md Outdated Show resolved Hide resolved
src/File/RenameUpload.php Show resolved Hide resolved
docs/book/file.md Show resolved Hide resolved
test/File/RenameUploadTest.php Outdated Show resolved Hide resolved
- Only test this one new property.
- Make documentation example syntax complete.
@alextech
Copy link
Contributor Author

Thanks @froschdesign for review and catching same inconsistencies that tripped me up yesterday!
Do you have a a hint on why 5.6 php travis is failing? I did not modify anything travis environment related to @weierophinney work, so would think it should work continuing from his setup.

@weierophinney
Copy link
Member

PSR-17, which is used via the package psr/http-factory, requires PHP 7. Mark those tests as requiring PHP 7 using @require PHP 7.

@michalbundyra
Copy link
Member

@alextech As it is now it introduces BC Break. We can avoid it by deprecating previous keys and adding new. Also we need to keep old setter/getter (marked as deprecated) and proxy to new one.

@weierophinney
Copy link
Member

This repository has been closed and moved to laminas/laminas-filter; a new issue has been opened at laminas/laminas-filter#3.

@weierophinney
Copy link
Member

This repository has been moved to laminas/laminas-filter. If you feel that this patch is still relevant, please re-open against that repository, and reference this issue. To re-open, we suggest the following workflow:

  • Squash all commits in your branch (git rebase -i origin/{branch})
  • Make a note of all changed files (`git diff --name-only origin/{branch}...HEAD
  • Run the laminas/laminas-migration tool on the code.
  • Clone laminas/laminas-filter to another directory.
  • Copy the files from the second bullet point to the clone of laminas/laminas-filter.
  • In your clone of laminas/laminas-filter, commit the files, push to your fork, and open the new PR.
    We will be providing tooling via laminas/laminas-migration soon to help automate the process.

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

Successfully merging this pull request may close these issues.

4 participants