Skip to content

[v6] #292 - Remove the fallbacks of the task registry on the service container - #517

Merged
njoubert-cleverage merged 1 commit into
dev-v6from
292-1
Dec 2, 2026
Merged

njoubert-cleverage merged 1 commit into
dev-v6from
292-1

Conversation

@njoubert-cleverage

Copy link
Copy Markdown
Member

Description

Part of #292 (lot 1: "Task registry fallbacks", #275, deprecated since 5.4). The other items of #292 follow in later pull requests.

  • ProcessManager: the $container argument (and protected property) is removed; TaskRegistryInterface $taskRegistry is required and moves before the optional arguments: (ProcessLogger, TaskLogger, ProcessConfigurationRegistry, ContextualOptionResolver, EventDispatcherInterface, TaskRegistryInterface $taskRegistry, iterable $stopCheckers = [], ?LockFactory $lockFactory = null);
  • ProcessHelpCommand only accepts a TaskRegistryInterface (the deprecated $container property is removed);
  • TaskRegistry only takes its service locator: a task of a process configuration unknown when the container is compiled (e.g. added at runtime) fails with Unable to resolve service reference for Task '<task>', it is no longer fetched from the service container;
  • the service key of the task configurations is removed from the configuration tree (Unrecognized option "service"), task: <code> is required. The internal service key written by TaskLocatorCompilerPass (and TaskConfiguration::getServiceReference(), the task_service log field) is kept;
  • the tasks and transformers of the bundle (no more public() / container.private in the defaults()) and the tasks autoconfigured with TaskInterface (no more setPublic(true)) are private; PublicTaskDeprecationCompilerPass is removed;
  • the bridges make their tasks private in their own next major version (archive#57, cache#73, doctrine#76, flysystem#79, rest#79, soap#72); they reference their tasks by code, so they are not affected by this change.

Upgrade notes: UPGRADE.md, ## v6.0, "Tasks and service container".

Requirements

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

Breaking changes

Major (v6.0): ProcessManager, TaskRegistry and ProcessHelpCommand constructors; service task configuration key removed; tasks and transformers private ($container->get() on them fails).

🤖 Generated with Claude Code

…iner

Lot 1 of #292 (#275, deprecated since 5.4):
- ProcessManager: the $container argument is removed, TaskRegistryInterface $taskRegistry is required, before
  $stopCheckers; ProcessHelpCommand only accepts a TaskRegistryInterface;
- TaskRegistry only fetches the tasks from its service locator: a task of a process configuration unknown when the
  container is compiled is not found;
- the service key of the task configurations is removed (task: <code> only), the internal key written by the
  TaskLocatorCompilerPass is kept;
- the tasks and transformers of the bundle, and the tasks autoconfigured with TaskInterface, are private;
  PublicTaskDeprecationCompilerPass is removed.

Co-Authored-By: Claude Opus 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.

1 participant