Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
feature #21334 [Workflow] Introduce concept of SupportStrategyInterfa…
…ce (andesk, lyrixx) This PR was merged into the 3.3-dev branch. Discussion ---------- [Workflow] Introduce concept of SupportStrategyInterface | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | yes | Tests pass? | yes | Fixed tickets | #20751 | License | MIT | Doc PR | - Commits ------- 134a58b [Workflow] Fixed code and tests 1843012 [Workflow] Introduce concept of SupprtStrategyInterface to allow other support checks than class instance
- Loading branch information
Showing
19 changed files
with
355 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
...dle/Tests/DependencyInjection/Fixtures/php/workflow_with_support_and_support_strategy.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?php | ||
|
||
use Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\FrameworkExtensionTest; | ||
|
||
$container->loadFromExtension('framework', array( | ||
'workflows' => array( | ||
'my_workflow' => array( | ||
'marking_store' => array( | ||
'type' => 'multiple_state', | ||
), | ||
'supports' => array( | ||
FrameworkExtensionTest::class, | ||
), | ||
'support_strategy' => 'foobar', | ||
'places' => array( | ||
'first', | ||
'last', | ||
), | ||
'transitions' => array( | ||
'go' => array( | ||
'from' => array( | ||
'first', | ||
), | ||
'to' => array( | ||
'last', | ||
), | ||
), | ||
), | ||
), | ||
), | ||
)); |
27 changes: 27 additions & 0 deletions
27
.../Tests/DependencyInjection/Fixtures/php/workflow_without_support_and_support_strategy.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
|
||
use Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\FrameworkExtensionTest; | ||
|
||
$container->loadFromExtension('framework', array( | ||
'workflows' => array( | ||
'my_workflow' => array( | ||
'marking_store' => array( | ||
'type' => 'multiple_state', | ||
), | ||
'places' => array( | ||
'first', | ||
'last', | ||
), | ||
'transitions' => array( | ||
'go' => array( | ||
'from' => array( | ||
'first', | ||
), | ||
'to' => array( | ||
'last', | ||
), | ||
), | ||
), | ||
), | ||
), | ||
)); |
21 changes: 21 additions & 0 deletions
21
...dle/Tests/DependencyInjection/Fixtures/xml/workflow_with_support_and_support_strategy.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?xml version="1.0" ?> | ||
|
||
<container xmlns="http://symfony.com/schema/dic/services" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xmlns:framework="http://symfony.com/schema/dic/symfony" | ||
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd | ||
http://symfony.com/schema/dic/symfony http://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> | ||
|
||
<framework:config> | ||
<framework:workflow name="my_workflow" support-strategy="foobar"> | ||
<framework:marking-store type="multiple_state"/> | ||
<framework:support>Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\FrameworkExtensionTest</framework:support> | ||
<framework:place>first</framework:place> | ||
<framework:place>last</framework:place> | ||
<framework:transition name="foobar"> | ||
<framework:from>a</framework:from> | ||
<framework:to>a</framework:to> | ||
</framework:transition> | ||
</framework:workflow> | ||
</framework:config> | ||
</container> |
20 changes: 20 additions & 0 deletions
20
.../Tests/DependencyInjection/Fixtures/xml/workflow_without_support_and_support_strategy.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?xml version="1.0" ?> | ||
|
||
<container xmlns="http://symfony.com/schema/dic/services" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xmlns:framework="http://symfony.com/schema/dic/symfony" | ||
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd | ||
http://symfony.com/schema/dic/symfony http://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> | ||
|
||
<framework:config> | ||
<framework:workflow name="my_workflow"> | ||
<framework:marking-store type="multiple_state"/> | ||
<framework:place>first</framework:place> | ||
<framework:place>last</framework:place> | ||
<framework:transition name="foobar"> | ||
<framework:from>a</framework:from> | ||
<framework:to>a</framework:to> | ||
</framework:transition> | ||
</framework:workflow> | ||
</framework:config> | ||
</container> |
17 changes: 17 additions & 0 deletions
17
...dle/Tests/DependencyInjection/Fixtures/yml/workflow_with_support_and_support_strategy.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
framework: | ||
workflows: | ||
my_workflow: | ||
marking_store: | ||
type: multiple_state | ||
supports: | ||
- Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\FrameworkExtensionTest | ||
support_strategy: foobar | ||
places: | ||
- first | ||
- last | ||
transitions: | ||
go: | ||
from: | ||
- first | ||
to: | ||
- last |
14 changes: 14 additions & 0 deletions
14
.../Tests/DependencyInjection/Fixtures/yml/workflow_without_support_and_support_strategy.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
framework: | ||
workflows: | ||
my_workflow: | ||
marking_store: | ||
type: multiple_state | ||
places: | ||
- first | ||
- last | ||
transitions: | ||
go: | ||
from: | ||
- first | ||
to: | ||
- last |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,8 @@ | ||
CHANGELOG | ||
========= | ||
|
||
3.3.0 | ||
----- | ||
|
||
* Deprecated class name support in `WorkflowRegistry::add()` as second parameter. | ||
Wrap the class name in an instance of ClassInstanceSupportStrategy instead. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.