Skip to content

#314 - Scheduler: enter the context with the fields of the launch form - #316

Open
clever-age-gtonon wants to merge 3 commits into
mainfrom
#314
Open

clever-age-gtonon wants to merge 3 commits into
mainfrom
#314

Conversation

@clever-age-gtonon

Copy link
Copy Markdown

Description

Fixes #314:

  • Scheduler: the context of a schedule is entered with the fields of the launch form of its process (ui.form.context: types, default values, field constraints) instead of free key/value pairs only (still available when the process allows extra context, or declares no launch form). The internal ContextFormType is shared with the launch form; its fields are loaded with the events of the form (PRE_SET_DATA, PRE_SUBMIT).
  • When the process is changed in the schedule form, only the context row is reloaded with htmx, served by AssetMapper (after a confirmation when values were entered). The context is still stored as a list of key/value rows.
  • Robustness (from the review): a stored value that its field cannot read is displayed empty; an invalid launch form falls back to free key/value pairs with a warning; a warning names the stored context keys that the launch form does not accept (removed on save); the default values of another process do not change the managed schedule; a scalar ProcessSchedule query parameter no longer fails.

Checked locally: all tests OK (854), quality OK (phpstan, php-cs-fixer, rector, twig-cs-fixer). Not run with pcov coverage.

Requirements

  • Documentation updates
    • Reference
    • Cookbooks
    • Changelog
  • Unit tests

Breaking changes

  • (minor) symfony/asset-mapper is now required, and the bundle prepends its assets directory to framework.asset_mapper.paths (this enables AssetMapper in applications that did not use it). In production, run bin/console asset-map:compile when deploying, otherwise the scripts of the bundle are not found and the context of a schedule is no longer reloaded when its process changes. See UPGRADE.md.

🤖 Generated with Claude Code

…m of the process

The context of a schedule is entered with the fields of the launch form of its process (ui.form.context), loaded with the events of the form and reloaded with htmx when the process changes (AssetMapper).

Review fixes:
* a stored value that its field cannot read is displayed empty (edit no longer fails);
* an invalid launch form falls back to free key/value pairs, with a warning;
* a warning names the stored context keys that the launch form does not accept;
* the default values of another process are displayed by the form, the managed schedule is not changed;
* a scalar ProcessSchedule query parameter no longer fails;
* confirmation before the values entered in the context are replaced;
* AssetMapper documented (UPGRADE, installation).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
clever-age-gtonon and others added 2 commits November 27, 2026 18:03
…e a third-party Twig deprecation

* LaunchActionTest uses ContextFormType, ProcessScheduleCrudTest uses ContextField (risky tests with coverage);
* collectDeprecations() ignores TemplateWrapper::unwrap() without argument (old symfony/twig-bridge with Twig 3.30).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…idge in the functional tests

failOnDeprecation made the lowest dependencies job fail on TemplateWrapper::unwrap() without argument, called by the old symfony/twig-bridge (not by the bundle). The error handler of the functional tests ignores it and gives every other error to the handler of PHPUnit.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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.

[Evolution] Réutiliser le formulaire de lancement d'un process pour configurer le contexte d'un ProcessSchedule

1 participant