You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Changes
#81 Add missing tests: functional tests of the UI and the HTTP API on a test application (SQLite, in-memory Messenger), unit tests of every class (DI, command, migrations, entities, managers, message handlers, scheduler, Monolog handlers, forms, EasyAdmin fields and filters, Twig, validators); memory_limit set to 512M for the test suite.
#83 Remove UploadAndExecuteAction (route process_upload_and_execute), ProcessUploadFileType and ProcessConfigurationValueResolver: the action was broken and unreachable, file uploads are handled by LaunchAction (entrypoint_type: file).
#84 Add LogRecord::hasContextInfo(), deprecate the misnamed LogRecord::contextIsEmpty() (it returns true when the context is not empty). Add tests.
#85ProcessHandler: default report increment level aligned on the bundle configuration (Warning); declare the symfony/ux-twig-component dependency. Add tests.
#48 Executions list: the duration is rendered by the @CleverAgeUiProcess/admin/field/duration.html.twig template, so that its format can be changed by overriding the template instead of ProcessExecutionCrudController (the $translator argument of its constructor is no longer used: deprecated, will be removed in 4.0). Add tests.
#62 Notify the end of the process executions with Symfony Notifier (optional symfony/notifier dependency): notification bundle configuration (enabled, default false; statuses among failed, finish_with_report (finished with log levels counted in its report), finish, default [failed, finish_with_report]; channels, default the notifier channel policy; recipients, default the notifier admin recipients), overridden by the notification option of each process. Add the ProcessExecutionEndedEvent, dispatched when a top-level process execution has ended and has been saved (new optional $eventDispatcher argument of ProcessEventSubscriber). Add documentation and a cookbook. Add tests.
#129 CI: migrations job running the migrations on MySQL, MariaDB and PostgreSQL, with DBAL 3 and 4 (migrate, doctrine:schema:validate, migrate first, migrate again); console of the test application (tests/App/bin/console), database URL overridable with DATABASE_URL (SQLite by default).
Fixes
#89ProcessConfigurationsManager: resolve the ui.default option with a normalizer instead of nested options defined with setDefault() (deprecated since symfony/options-resolver 7.3, removed in 8.0). With Symfony 8, a process launched with the UI form (ui_launch_mode: form) without ui.default no longer fails (Cannot use object of type Closure as array), and ui.default is validated again. Add tests.
#91LoginController: pass error and last_username (AuthenticationUtils) to the login template, so that a failed login displays the error message and keeps the email. Test updated.
#95DoctrineProcessHandler: detach the written LogRecord entities after each flush (the Monolog records were detached instead), so that the identity map no longer grows during long processes; LogRecord::$processExecution cascade reduced from all to persist, so that detaching a log record does not detach the current process execution (which would then be inserted again). Add tests.
#97 Align the mapping and the schema created by the migrations: ProcessSchedule::$input mapped as VARCHAR(255) as created by the migrations (was TEXT); Version20261005120000 migration (MySQL / MariaDB, PostgreSQL) making log_record.process_execution_idNOT NULL (log records without process execution are deleted) and process_execution.context nullable, as in the mapping.
#99 Fix the migrations on PostgreSQL (they could not create a working schema): id columns created as identity columns (the sequences were not used: inserts failed with the IDENTITY generation), process_schedule created with the PostgreSQL syntax (AUTO_INCREMENT failed). PostgreSQL support documented.
#103 When a process task clears the entity manager (shared with the UI bundle, e.g. ClearEntityManagerTask), the current process execution is attached again before being saved and before writing the logs: it was inserted again (an execution left started without logs, a duplicate one with the final status and all the logs). Add ProcessExecutionManager::getManagedProcessExecution() and ProcessExecutionRepository::getManaged(). When a process task closes the entity manager (Doctrine closes it after an error during a flush), it is reset (ManagerRegistry::resetManager(), new optional ProcessExecutionRepository argument) before saving the execution and writing the logs: the execution was left started, without end date nor logs. Add tests.
#105LogProcessFilter ("Process" filter of the logs): the process codes condition is added with andWhere() (where() replaced the search clause, whose parameters stayed bound: 500 when searching with this filter), and the "is not" comparison is applied (it was ignored: the logs of the process were displayed). Add tests.
#107CronScheduler: an error on a process schedule (e.g. every 0 seconds, accepted by the validator but not by the Symfony Scheduler) is logged and the schedule skipped; it skipped all the next schedules. Add tests.
#109ProcessExecutionCrudController::downloadLogFile(): 404 when the log file no longer exists (file_get_contents() warning: 500). Add tests.
#111ProcessExecutionDurationFilter: the filter values are bound as DQL parameters (they were concatenated in the DQL; not exploitable, the form field is numeric). Add tests.
#113 HTTP API, synchronous execution: the error message is followed by the id of the process execution ((process execution: <id>)), to find its logs in the UI; add ProcessExecutionManager::getLastProcessExecution(). Add tests.
#117 Schedule validators: every expressions checked as the Symfony Scheduler does (PeriodicalTrigger): expressions such as 0 seconds, yesterday or monday were accepted but stopped the scheduler_cron worker, ISO 8601 durations (PT1H) were refused; message fixed ("is not a valid "every" expression"). A "hashed" cron expression is refused (500). No TypeError on null. Add tests.
#119 Launch form: a context row without key is left out of the context (reported by its NotBlank constraint): it gave a 500 when the process has constraints on the context, and a PHP 8.5 deprecation (null array offset). Add tests.
#121ListAction / LaunchAction: accessed directly (/process/list, /process/launch), redirected to the dashboard (/process?routeName=...) instead of a 500. Add tests.
#123 HTTP API: the parameters of the query string are also read without body, and queue is read from the query string (the form data takes precedence). Add tests.
#125ProcessSchedule::getContext() decodes a JSON string as an array; User::getRoles() no longer duplicates ROLE_USER; symfony/expression-language declared (used by Assert\When); the underscore_number_aware Doctrine naming strategy prerequisite is documented. Add tests.
#127Version20261008120000 migration (MySQL / MariaDB, PostgreSQL): remove the (DC2Type:...) column comments created by the migrations when the type comments are not used (always with DBAL 4, disable_type_comments with DBAL 3): the schema was always reported as out of sync; with DBAL 3 using the type comments, they are kept. UiOptions PHPDoc: types instead of string literals ('run': ?bool, context rows int|string).