Skip to content

Commit 49a98f2

Browse files
committed
[FrameworkBundle] Deprecate creating public workflow services
1 parent d0e1039 commit 49a98f2

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ CHANGELOG
1919
* Add `KernelTestCase::getContainer()` as the best way to get a container in tests
2020
* Rename the container parameter `profiler_listener.only_master_requests` to `profiler_listener.only_main_requests`
2121
* Add service `fragment.uri_generator` to generate the URI of a fragment
22+
* Deprecate registering workflow services as public
2223

2324
5.2.0
2425
-----

DependencyInjection/FrameworkExtension.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -863,6 +863,10 @@ private function registerWorkflowConfiguration(array $config, ContainerBuilder $
863863
$workflowDefinition->replaceArgument(1, $markingStoreDefinition ?? null);
864864
$workflowDefinition->replaceArgument(3, $name);
865865
$workflowDefinition->replaceArgument(4, $workflow['events_to_dispatch']);
866+
$workflowDefinition->addTag('container.private', [
867+
'package' => 'symfony/framework-bundle',
868+
'version' => '5.3',
869+
]);
866870

867871
// Store to container
868872
$container->setDefinition($workflowId, $workflowDefinition);

Resources/config/workflow.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
])
3030
->abstract()
3131
->public()
32+
->tag('container.private', ['package' => 'symfony/framework-bundle', 'version' => '5.3'])
3233
->set('state_machine.abstract', StateMachine::class)
3334
->args([
3435
abstract_arg('workflow definition'),
@@ -39,6 +40,7 @@
3940
])
4041
->abstract()
4142
->public()
43+
->tag('container.private', ['package' => 'symfony/framework-bundle', 'version' => '5.3'])
4244
->set('workflow.marking_store.method', MethodMarkingStore::class)
4345
->abstract()
4446
->set('workflow.registry', Registry::class)

0 commit comments

Comments
 (0)