Add missing event short name on apply state machine transition#1037
Merged
Conversation
loic425
commented
Jun 18, 2025
Member
| Q | A |
|---|---|
| Bug fix? | yes |
| New feature? | no |
| BC breaks? | no |
| Deprecations? | no |
| Related tickets | |
| License | MIT |
loic425
commented
Jun 18, 2025
| $create = (new Create(name: 'app_book_create'))->withResource($resource); | ||
| $show = (new Show(name: 'app_book_show'))->withResource($resource); | ||
| $applyStateMachineTransition = (new ApplyStateMachineTransition(name: 'app_book_publish'))->withResource($resource); | ||
| $applyStateMachineTransition = (new ApplyStateMachineTransition(name: 'app_book_publish', stateMachineTransition: 'publish'))->withResource($resource); |
Member
Author
There was a problem hiding this comment.
Normally, stateMachineTransition is required, so I think it's better to add it on the test.
Event short name is used to build the Sylius resource event that was dispatched on resource controller. It's a bc-layer.
loic425
commented
Jun 18, 2025
| $key = $operation->getName(); | ||
|
|
||
| $operations->add($key, $this->addDefaults($resource, $operation)); | ||
| $operations->add($key, $this->addDefaults($operation)); |
Member
Author
There was a problem hiding this comment.
resource argument was not used on the private method.
diimpp
approved these changes
Jun 18, 2025
NoResponseMate
approved these changes
Jun 18, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.