Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Workflow] Revert deprecation about Registry #51976

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions UPGRADE-6.2.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,6 @@ VarDumper
Workflow
--------

* The `Registry` is marked as internal and should not be used directly. use a tagged locator instead
```
tagged_locator('workflow', 'name')
```
Comment on lines -135 to -138
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we keep this? back in time in 6.2 it still is deprecated

* The first argument of `WorkflowDumpCommand` should be a `ServiceLocator` of
all workflows indexed by names
* Deprecate calling `Definition::setInitialPlaces()` without arguments
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,8 @@
->abstract()
->set('workflow.marking_store.method', MethodMarkingStore::class)
->abstract()
->set('.workflow.registry', Registry::class)
->alias(Registry::class, '.workflow.registry')
->deprecate('symfony/workflow', '6.2', 'The "%alias_id%" alias is deprecated, inject the workflow directly.')
->alias('workflow.registry', '.workflow.registry')
->deprecate('symfony/workflow', '6.2', 'The "%alias_id%" alias is deprecated, inject the workflow directly.')
->set('workflow.registry', Registry::class)
->alias(Registry::class, 'workflow.registry')
->set('workflow.security.expression_language', ExpressionLanguage::class)
;
};
2 changes: 1 addition & 1 deletion src/Symfony/Bundle/TwigBundle/Resources/config/twig.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@
->tag('translation.extractor', ['alias' => 'twig'])

->set('workflow.twig_extension', WorkflowExtension::class)
->args([service('.workflow.registry')])
->args([service('workflow.registry')])

->set('twig.configurator.environment', EnvironmentConfigurator::class)
->args([
Expand Down
1 change: 1 addition & 0 deletions src/Symfony/Component/Workflow/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ CHANGELOG
* Add support for multiline descriptions in PlantUML diagrams
* Add PHP attributes to register listeners and guards
* Deprecate `GuardEvent::getContext()` method that will be removed in 7.0
* Revert: Mark `Symfony\Component\Workflow\Registry` as internal

6.2
---
Expand Down
2 changes: 0 additions & 2 deletions src/Symfony/Component/Workflow/Registry.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
/**
* @author Fabien Potencier <[email protected]>
* @author Grégoire Pineau <[email protected]>
*
* @internal since Symfony 6.2. Inject the workflow where you need it.
*/
class Registry
{
Expand Down