Skip to content

#318 - Process tasks: no more kernel injection, sub-process buffer in the temporary directory - #322

Merged
njoubert-cleverage merged 2 commits into
mainfrom
318
Oct 20, 2026
Merged

njoubert-cleverage merged 2 commits into
mainfrom
318

Conversation

@njoubert-cleverage

Copy link
Copy Markdown
Member

Description

Fixes #318.

No more kernel

  • CommandRunnerTask(KernelInterface|string $projectDir): default cwd of the commands; service argument %kernel.project_dir%.
  • ProcessLauncherTask(..., KernelInterface|string $consolePath, ?string $environment = null): service arguments %kernel.project_dir%/bin/console and %kernel.environment%.
  • SubprocessInstance(KernelInterface|string $consolePath, ..., ?string $environment = null) (new last argument): without environment, --env is omitted (default environment of the console).
  • Passing a KernelInterface still works (same paths and environment as before) with a deprecation (5.4): the arguments will only accept strings in v6.0 (to add to v6.0: remove the deprecated code #292). The $kernel properties are kept (deprecated, only set when the kernel is passed).

SubprocessInstance

  • The JSON buffer of json_buffering is written in sys_get_temp_dir() instead of <project dir>/var/ (which may be read-only, e.g. in a container); its path is still the output of ProcessLauncherTask.
  • The <log dir>/process directory is no longer created: it was never used ($logDir deprecated).

Documentation: process_launcher reference page (buffer location, console and environment, the JSON stream files are not removed by the task). CHANGELOG.

Tests: SubprocessInstanceTest (new: command line, without environment, buffer in the temporary directory, missing console, kernel deprecated without creating the log directory); CommandRunnerTaskTest (project directory as default cwd, kernel deprecated); ProcessLauncherTaskTest (kernel deprecated: console path and environment taken from it).

Checked in the container (990 tests): highest dependencies (PHP 8.5, Symfony 8.1), lowest dependencies (PHP 8.2, Symfony 6.4.0), Symfony 6.4.48 on PHP 8.2 and 8.5, Symfony 7.4: no deprecation, no risky test (with pcov coverage). PHPStan, PHP-CS-Fixer and Rector OK. demo.process_launcher of the demo runs with this branch.

Requirements

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

Breaking changes

None. New deprecation (5.4): passing a KernelInterface to CommandRunnerTask, ProcessLauncherTask and SubprocessInstance. The JSON buffer of ProcessLauncherTask moves to the temporary directory (its path is still given as output).

🤖 Generated with Claude Code

njoubert-cleverage and others added 2 commits October 20, 2026 16:19
… the temporary directory

- CommandRunnerTask receives the project directory, ProcessLauncherTask
  the path of the console and the environment (%kernel.project_dir%,
  %kernel.environment%), SubprocessInstance the path of the console and an
  optional environment. Passing a KernelInterface is deprecated, the
  arguments will only accept strings in v6.0.
- SubprocessInstance writes the JSON buffer (json_buffering) in the system
  temporary directory instead of var/ of the project, no longer creates the
  unused <log dir>/process directory, and omits --env without environment.
- Tests, documentation (process_launcher task) and CHANGELOG updated.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@njoubert-cleverage
njoubert-cleverage merged commit db38b07 into main Oct 20, 2026
18 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.

Process tasks: no more kernel injection, sub-process buffer in the temporary directory

1 participant