Skip to content

Conversation

@EduCavalheiro
Copy link

@EduCavalheiro EduCavalheiro commented Nov 20, 2025

Description

This PR addresses a regression introduced in PR 286 where the $field argument in StateChanged was made mandatory.

This caused existing applications that rely on implicit field resolution (by omitting the argument) to fail with a Too few arguments error.

Related to:

Changes

  • The $field argument is now made nullable and given a default value (null) to restore backward compatibility with existing usage:

public function __construct( ?State $initialState, ?State $finalState, Transition $transition, $model, ?string $field = null){}

@EduCavalheiro EduCavalheiro changed the title fix(StateChanged): update field param to be consistent with signature fix(StateChanged): Make StateChange field argument nullable Nov 20, 2025
@freekmurze
Copy link
Member

Could you rebase with main in order to get the tests passing?

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