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

Allowed payload to be replaced in EndpointRequestDefinition #8

Merged
merged 3 commits into from
Oct 4, 2023

Conversation

Steveb-p
Copy link
Collaborator

@Steveb-p Steveb-p commented Oct 2, 2023

Question Answer
JIRA issue N/A
Type feature/bug/improvement
Target eZ Platform version v4.5
BC breaks no
Doc needed no

This PR allows payload to be replaced when creating EndpointRequestDefinitions in a data provider.

First of all, it introduces the withPayload method, which returns a clone of a request definition with changed payload.

Second, payload name is now always set by the factory. This prevents an issue where - since name is used as data provider dataset key - changing the request payload caused data provider to contain multiple entries under the same key, resulting in PHPUnit error.

Checklist:

  • Provided PR description.
  • Tested the solution manually.
  • Provided automated test coverage.
  • Checked that target branch is set correctly (master for features, the oldest supported for bugs).
  • Asked for a review (ping @ibexa/engineering).

@alongosz alongosz requested a review from a team October 2, 2023 13:08
@konradoboza konradoboza requested a review from a team October 3, 2023 06:08
@Steveb-p Steveb-p requested a review from alongosz October 4, 2023 07:57
@alongosz alongosz requested a review from a team October 4, 2023 08:44
@Steveb-p Steveb-p merged commit 43738a7 into main Oct 4, 2023
7 checks passed
@Steveb-p Steveb-p deleted the with-payload branch October 4, 2023 08:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants