Skip to content

Commit be384cf

Browse files
minor symfony#40875 [FrameworkBundle] Deprecate creating public workflow services (fancyweb)
This PR was merged into the 5.3-dev branch. Discussion ---------- [FrameworkBundle] Deprecate creating public workflow services | Q | A | ------------- | --- | Branch? | 5.x | Bug fix? | no | New feature? | no | Deprecations? | yes | Tickets | - | License | MIT | Doc PR | - AFAIK, workflow services don't need to be public. friendly ping to @lyrixx as a reviewer. Commits ------- 79cbf00 [FrameworkBundle] Deprecate creating public workflow services
2 parents 71c6c42 + 79cbf00 commit be384cf

File tree

5 files changed

+9
-0
lines changed

5 files changed

+9
-0
lines changed

UPGRADE-5.3.md

+1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ FrameworkBundle
4343
* Deprecate the `session` service and the `SessionInterface` alias, use the `\Symfony\Component\HttpFoundation\Request::getSession()` or the new `\Symfony\Component\HttpFoundation\RequestStack::getSession()` methods instead
4444
* Deprecate the `KernelTestCase::$container` property, use `KernelTestCase::getContainer()` instead
4545
* Rename the container parameter `profiler_listener.only_master_requests` to `profiler_listener.only_main_requests`
46+
* Deprecate registering workflow services as public
4647

4748
HttpFoundation
4849
--------------

UPGRADE-6.0.md

+1
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ FrameworkBundle
8585
`cache_clearer`, `filesystem` and `validator` services are now private.
8686
* Removed the `lock.RESOURCE_NAME` and `lock.RESOURCE_NAME.store` services and the `lock`, `LockInterface`, `lock.store` and `PersistingStoreInterface` aliases, use `lock.RESOURCE_NAME.factory`, `lock.factory` or `LockFactory` instead.
8787
* Remove the `KernelTestCase::$container` property, use `KernelTestCase::getContainer()` instead
88+
* Registered workflow services are now private
8889

8990
HttpFoundation
9091
--------------

src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md

+1
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
-----

src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php

+4
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);

src/Symfony/Bundle/FrameworkBundle/Resources/config/workflow.php

+2
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)