Problem

`Component::validate()` in Modeler API checks a configuration by submitting it as form input. Form API treats any checkbox input other than NULL as checked, so a FALSE sent by FlowDrop would be stored as TRUE.

`src/WorkflowComponent.php` works around it: it submits FALSE as NULL and puts FALSE back after validation.

Proposal

Report the bug in Modeler API. Once a fixed release is out, require it in `composer.json` and delete `WorkflowComponent`, using `Component` directly.

Expected

- A checkbox set to off in FlowDrop is saved as off, with and without the workaround.
- `tests/src/Kernel/FlowDropModelerTest.php` (the FALSE-survives-validation check, line 171) keeps passing; the unit test that asserts a `WorkflowComponent` (`tests/src/Unit/WorkflowConverterTest.php:485`) is updated.

Notes

- Upstream issue in Modeler API: to be filed and linked here.

Comments

d34dman created an issue.