Skip to content

Instantly share code, notes, and snippets.

@meDavid
Created March 28, 2017 09:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save meDavid/1d0bd8b39dd1889ed20de65d169454c3 to your computer and use it in GitHub Desktop.
Save meDavid/1d0bd8b39dd1889ed20de65d169454c3 to your computer and use it in GitHub Desktop.
guard expression in Symfony 3.3+
framework:
workflows:
creditcard_application_flow:
....
transitions:
....
create_card:
guard: "subject->getRequestedCreditLimit() < 200 or subject->getRequestedCreditLimit() <= subject->getAppprovedCreditLimit()"
from: application_validated
to: card_created
.....
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment