Repository navigation
v6.0: remove the deprecated code #292
Description
Description
Remove, in v6.0, the code deprecated during v5 (and before), with its BC layers. Inventory on main @ b38efed (trigger_deprecation(), @deprecated, #[\Deprecated], deprecated options / configuration keys); add to this list every new deprecation until v6.0.
Runtime deprecations (trigger_deprecation())
-
Task registry fallbacks (Fetch tasks from a service locator instead of the service container (v5 step of #114) #275, since 5.4) — also makes Tasks services should not be public #114 complete:
-
ProcessManager: make the?TaskRegistry $taskRegistryargument required, remove the$containerargument and the fallback on the service container;ProcessHelpCommand(Bundle best practices: residues (generic transformers autowiring, help command container, deprecation notices) #305): accept only aTaskRegistryas second argument (no moreContainerInterface), remove the deprecated$containerproperty (ProcessManager.php,ProcessHelpCommand.php); -
TaskRegistry: remove the fallback on the service container (second constructor argument,'@service_container'inconfig/services/registry.yaml); - remove the
servicekey of the task configurations (deprecated since 5.4 by Reference the tasks by a code in the process configurations (task key, #[AsTask]) #91,setDeprecated()inConfiguration):task: <code>only; - make the tasks and transformers of the bundle private: remove the
public: trueand thecontainer.privatetag (fetching them directly from the service container is deprecated since 5.4 by Reference the tasks by a code in the process configurations (task key, #[AsTask]) #91) ofconfig/services/task.yaml/transformer.yaml, and thepublic: trueof theTaskInterfaceautoconfiguration (DependencyInjection: add FQCN aliases and autoconfiguration for TaskInterface and TransformerInterface #272) with the internalPublicTaskDeprecationCompilerPass(Bundle best practices: residues (generic transformers autowiring, help command container, deprecation notices) #305, deprecates the direct access to the application tasks made public only by this autoconfiguration); same for the tasks of the bridge bundles.
-
-
Initialization failure (An exception thrown by initialize() does not abort the process: upstream tasks run, or the process succeeds #222, since 5.1): an exception thrown by
InitializableTaskInterface::initialize()must fail the process before executing any task (ProcessManager::initialize()). -
EventDispatcherTask(EventDispatcherTask ignores the event_name option #189, since 5.1): withevent_nameset, stop dispatching the event under its class name too (EventDispatcherTask.php, docevent_dispatcher_task.md). -
MappingTransformer([Transformer] We should throw an exception when we try to transform an invalid index #117, since 5.2): a non simple target property of an array destination (e.g.address.city) throws an\UnexpectedValueExceptioninstead of creating a literal key (MappingTransformer.php, docmapping_transformer.md). -
CallbackTransformer(since 2.0.4): remove theadditional_parametersoption (useright_parameters) (CallbackTransformer.php, doccallback_transformer.md). -
TaskConfiguration::getErrors()(since 2.0.4): remove the method (usegetErrorOutputs()), and the@deprecated$logErrorsproperty (TaskConfiguration.php). -
errorstask configuration key (notice since 5.4, Bundle best practices: residues (generic transformers autowiring, help command container, deprecation notices) #305,setDeprecated()): deprecated alias oferror_outputs(Configuration.php,ProcessConfigurationRegistry.php, doc02-task_definition.md). -
CheckSerializerCompilerPass(CheckSerializerCompilerPass: do not fail the container compilation when the serializer is disabled #278, notice since 5.4, Bundle best practices: residues (generic transformers autowiring, help command container, deprecation notices) #305): no longer registered, remove the class. -
Unknown task
error_strategy(Configuration tree: validate the task error_strategy, boolean public, describe the nodes #310, notice since 5.4 when the container is compiled): reject any value other thanskip/stop(enumNode,nullallowed for thedefault_error_strategy), removeCleverAgeProcessExtension::checkErrorStrategies()(Configuration.php,CleverAgeProcessExtension.php, doc02-task_definition.md); theUnknown error strategyexception ofProcessManager::processExecution()becomes unreachable. -
DataQueueEventListener(DataQueueEventListener: deprecate it (unbounded queue, nothing dispatches its event) #311, since 5.4,deprecatedservice): remove thecleverage_process.event_listener.data_queueservice (config/services/event.yaml) and the class (DataQueueEventListener.php), docevent_dispatcher_task.md. -
Kernel arguments of the process tasks (Process tasks: no more kernel injection, sub-process buffer in the temporary directory #318, since 5.4):
CommandRunnerTask,ProcessLauncherTaskandSubprocessInstanceonly accept the paths (project directory, console) as strings, no moreKernelInterface; remove the deprecated$kernelproperties andSubprocessInstance::$logDir(CommandRunnerTask.php,ProcessLauncherTask.php,SubprocessInstance.php). -
Eager transformer registration (TransformerRegistry: lazy-load transformers through a service locator indexed by code #276, since 5.4) — v6 step tracked by TransformerRegistry: require the code tag attribute and remove eager transformer registration (v6 step of #276) #280: the
codeattribute of thecleverage.transformertag (or#[AsTransformer]) becomes required, removeTransformerRegistry::addTransformer()and the eager registration of the transformers tagged withoutcode(TransformerRegistry.php,TransformerLocatorCompilerPass.php). -
RegistryCompilerPass(TransformerRegistry: lazy-load transformers through a service locator indexed by code #276, notice since 5.4): no longer registered, remove the class.
Deprecated without runtime notice
-
ProcessLauncherTask::process_options: deprecated option, any non-empty value already throws: remove it (docprocess_launcher_task.md). -
TransformerInterface::getCode()(TransformerRegistry: lazy-load transformers through a service locator indexed by code #276,@deprecatedPHPDoc since 5.4, no runtime notice possible for an interface method): remove it from the interface, the code being given by the tagcodeattribute /#[AsTransformer](with TransformerRegistry: require the code tag attribute and remove eager transformer registration (v6 step of #276) #280) (TransformerInterface.php).
For each item
Remove the code and the tests of the deprecated behaviour, update the reference documentation (Notes / Deprecated mentions), and list the change in the CHANGELOG and an UPGRADE-6.0.md.
Note: the bridge bundles have their own deprecations, for their next major version (e.g. Client::geUri() in rest, LogRecord::contextIsEmpty() in ui).
Requirements
- Documentation updates
- Reference
- Cookbooks
- Changelog
- Unit tests
Breaking changes
Major: removal of the deprecated code (v6.0).
Activity