Skip to content

#196 - Prefix the upload_directory parameter and the Twig functions and filter, deprecate the former names - #197

Merged
njoubert-cleverage merged 2 commits into
mainfrom
196
Oct 21, 2026
Merged

njoubert-cleverage merged 2 commits into
mainfrom
196

Conversation

@njoubert-cleverage

Copy link
Copy Markdown
Member

Description

Fixes #196, as the route names (#172): the global names of the bundle are prefixed, the former ones deprecated and removed in 4.0.

  • Upload directory: new cleverage_ui_process.upload_directory parameter, used by the launch form and the HTTP API. upload_directory keeps the same value (%cleverage_ui_process.upload_directory%) and is deprecated: reading it triggers a deprecation (ContainerBuilder::deprecateParameter()), and when the application still sets it, its value is used with a deprecation, unless the new parameter is also set (new internal UploadDirectoryParameterPass, at compile time).
  • Twig: the functions log_label, log_translation, log_css_class, get_last_execution_date, get_process_source, get_process_target, resolve_ui_options and the filter md5 get a cleverage_ui_process_ prefixed name, used by the templates of the bundle. The former names stay, deprecated with DeprecatedCallableInfo (notice when a template using them is compiled, e.g. "Twig Function "log_label" is deprecated; use "cleverage_ui_process_log_label" instead").
  • Documentation (bundle configuration, launch form, HTTP API, file upload cookbook), UPGRADE.md (v3.3), CHANGELOG.

Out of scope (BC, 4.0): translation domains, ui:BootstrapModal component, cron schedule, execute_process transport, process_user_provider.

Tests: UploadDirectoryParameterPassTest (defaults, new parameter, deprecated parameter set, both set, deprecation when reading), registration of the pass, the Twig extension tests check the prefixed names and the deprecations of the former ones. The test application uses the new parameter.

Checked:

  • PHP 8.5, highest dependencies: 471 tests, no risky test (pcov coverage, the new pass 100 %). PHPStan, PHP-CS-Fixer, Rector and Twig-CS-Fixer OK.
  • PHP 8.2, lowest dependencies (Symfony 6.4, Twig 3.23): 471 tests OK.
  • Demo, branch checked out in its vendor: lint:container OK, lint:twig --show-deprecations on the templates of the bundle without deprecation, process list, executions and logs lists (log level badges), launch form with a file upload saved in var/storage/uploads.

Requirements

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

Breaking changes

None: the former names keep working, deprecated.

🤖 Generated with Claude Code

njoubert-cleverage and others added 2 commits October 21, 2026 10:23
…nd filter, deprecate the former names

New cleverage_ui_process.upload_directory parameter; upload_directory is
deprecated, still honoured when the application sets it (new internal
UploadDirectoryParameterPass). The Twig functions and the md5 filter are
prefixed with cleverage_ui_process_, the former names are deprecated Twig
callables. Removed in 4.0. Tests, documentation, UPGRADE.md and CHANGELOG.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@njoubert-cleverage
njoubert-cleverage merged commit 648549f into main Oct 21, 2026
26 checks passed
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.

Prefix the upload_directory parameter and the Twig functions and filter, deprecate the former names

1 participant