Repository navigation
#318 - Process tasks: no more kernel injection, sub-process buffer in the temporary directory - #322
Merged
Merged
Conversation
… 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) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes #318.
No more kernel
CommandRunnerTask(KernelInterface|string $projectDir): defaultcwdof the commands; service argument%kernel.project_dir%.ProcessLauncherTask(..., KernelInterface|string $consolePath, ?string $environment = null): service arguments%kernel.project_dir%/bin/consoleand%kernel.environment%.SubprocessInstance(KernelInterface|string $consolePath, ..., ?string $environment = null)(new last argument): without environment,--envis omitted (default environment of the console).KernelInterfacestill 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$kernelproperties are kept (deprecated, only set when the kernel is passed).SubprocessInstance
json_bufferingis written insys_get_temp_dir()instead of<project dir>/var/(which may be read-only, e.g. in a container); its path is still the output ofProcessLauncherTask.<log dir>/processdirectory is no longer created: it was never used ($logDirdeprecated).Documentation:
process_launcherreference 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 defaultcwd, 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_launcherof the demo runs with this branch.Requirements
Breaking changes
None. New deprecation (5.4): passing a
KernelInterfacetoCommandRunnerTask,ProcessLauncherTaskandSubprocessInstance. The JSON buffer ofProcessLauncherTaskmoves to the temporary directory (its path is still given as output).🤖 Generated with Claude Code