I still have something freaky: sometimes the order of workflow statuses is changed comparing 1.x-dev to v1.8
I do a grep on the weights in the config files:
# grep weight workflow.state.payment*
workflow.state.payment_canceled.yml:weight: 2
workflow.state.payment_closed.yml:weight: 1
workflow.state.payment_creation.yml:weight: -11
workflow.state.payment_errors.yml:weight: -4
workflow.state.payment_errors_returns.yml:weight: -3
workflow.state.payment_errors_returns_refused.yml:weight: -2
workflow.state.payment_instruction_processed.yml:weight: -7
workflow.state.payment_instruction_sent.yml:weight: -8
workflow.state.payment_not_executable.yml:weight: 0
workflow.state.payment_opened.yml:weight: -9
workflow.state.payment_payout_partially_processed.yml:weight: -6
workflow.state.payment_payout_processed.yml:weight: -5
workflow.state.payment_reprocess.yml:weight: -1
With workflow v1.8, the order on screen in the status option list is ("created" is the initial status which isn't shown):
workflow.state.payment_opened
workflow.state.payment_instruction_sent
workflow.state.payment_instruction_processed
workflow.state.payment_payout_partially_processed
workflow.state.payment_payout_processed
...
With workflow 1.x-dev, the order on screen in the status option list is
workflow.state.payment_instruction_sent
workflow.state.payment_opened
workflow.state.payment_instruction_processed
workflow.state.payment_payout_partially_processed
workflow.state.payment_payout_processed
..
I discovered this as one of my behat tests uses the default status while creating a node, which now selected "instruction sent" instead of "opened". Strange thing is, when I change the weight of workflow.state.payment_opened.yml to -10, the workflows appears again in the "right" order:
workflow.state.payment_opened
workflow.state.payment_instruction_sent
workflow.state.payment_instruction_processed
workflow.state.payment_payout_partially_processed.yml
workflow.state.payment_payout_processed.yml
...
At first sight the sorting code in WorkflowState looks ok to me. Weight -9 or -10 shouldn't really make a difference because they're both between -11 and -8. Any idea?
It's very repeatable:
- Change weight in the config file
- drush cim
- drush cr
- And you either get one or the other order
For the rest all the behats for my two biggest projects are now green/ok with version 1.x-dev. Not that guarantees anything 100%, but it's a good sign.