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

Allow specifying encoding for optional parts of multipart data #192

Merged

Conversation

jimcottrell
Copy link

Currently, any part of multipart data with an encoding provided in the spec will throw a validation error if it's not present in the body. As far as I know, providing an encoding value is not supposed to imply required for the part, so I've simply removed the check throwing an exception if a part doesn't exist when checking for a valid encoding.

I've expanded the test spec for this case and for good measure, I've added a test showing that the schema validation takes place, though I think other multipart tests probably do cover that.

@lezhnev74 Do you know if I'm missing something on this?

@jimcottrell jimcottrell force-pushed the multipart-encoding-required branch from 07882d4 to 56b2272 Compare February 21, 2023 20:38
Copy link
Member

@scaytrase scaytrase left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@scaytrase
Copy link
Member

@jimcottrell would you mind to rebase this PR ? Or should I take care of if by myself ?

@scaytrase
Copy link
Member

Oh there is online conflict resolution tool now, nice

@scaytrase scaytrase merged commit e69a504 into thephpleague:master Mar 23, 2023
@scaytrase
Copy link
Member

Thanks @jimcottrell !

@jimcottrell jimcottrell deleted the multipart-encoding-required branch March 27, 2023 17:23
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