Skip to content

Add missing event short name on apply state machine transition#1037

Merged
NoResponseMate merged 1 commit into
Sylius:1.13from
loic425:fix/missing-event-short-name
Jun 18, 2025
Merged

Add missing event short name on apply state machine transition#1037
NoResponseMate merged 1 commit into
Sylius:1.13from
loic425:fix/missing-event-short-name

Conversation

@loic425

@loic425 loic425 commented Jun 18, 2025

Copy link
Copy Markdown
Member
Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Related tickets
License MIT

$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);

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

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.

$key = $operation->getName();

$operations->add($key, $this->addDefaults($resource, $operation));
$operations->add($key, $this->addDefaults($operation));

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

resource argument was not used on the private method.

@NoResponseMate NoResponseMate merged commit 19f758a into Sylius:1.13 Jun 18, 2025
15 checks passed
@loic425 loic425 deleted the fix/missing-event-short-name branch June 18, 2025 12:12
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.

3 participants