-
Notifications
You must be signed in to change notification settings - Fork 155
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature #202 Remove winzou state machine dependency (loic425)
This PR was merged into the 1.7-dev branch. Discussion ---------- | Q | A | --------------- | ----- | Bug fix? | no | New feature? |yes | BC breaks? | no | Deprecations? | no | Related tickets | | License | MIT Commits ------- 7bb221d Remove winzou state machine dependency
- Loading branch information
Showing
13 changed files
with
123 additions
and
38 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
/test/app/cache | ||
/test/app/db.sql | ||
/test/app/logs | ||
/test/config/db.sql | ||
/test/var |
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
40 changes: 40 additions & 0 deletions
40
src/Bundle/DependencyInjection/Compiler/RegisterStateMachinePass.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,40 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the Sylius package. | ||
* | ||
* (c) Paweł Jędrzejewski | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Sylius\Bundle\ResourceBundle\DependencyInjection\Compiler; | ||
|
||
use Sylius\Bundle\ResourceBundle\Controller\StateMachine; | ||
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; | ||
use Symfony\Component\DependencyInjection\ContainerBuilder; | ||
use Symfony\Component\DependencyInjection\Reference; | ||
use winzou\Bundle\StateMachineBundle\winzouStateMachineBundle; | ||
|
||
final class RegisterStateMachinePass implements CompilerPassInterface | ||
{ | ||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function process(ContainerBuilder $container): void | ||
{ | ||
$bundles = $container->getParameter('kernel.bundles'); | ||
$winzouStateMachineEnabled = in_array(winzouStateMachineBundle::class, $bundles, true); | ||
|
||
if (!$winzouStateMachineEnabled) { | ||
return; | ||
} | ||
|
||
$stateMachineDefinition = $container->register('sylius.resource_controller.state_machine', StateMachine::class); | ||
$stateMachineDefinition->setPublic(false); | ||
$stateMachineDefinition->addArgument(new Reference('sm.factory')); | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the Sylius package. | ||
* | ||
* (c) Paweł Jędrzejewski | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
||
return [ | ||
Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true], | ||
Doctrine\Bundle\DoctrineBundle\DoctrineBundle::class => ['all' => true], | ||
Sylius\Bundle\ResourceBundle\SyliusResourceBundle::class => ['all' => true], | ||
BabDev\PagerfantaBundle\BabDevPagerfantaBundle::class => ['all' => true], | ||
Symfony\Bundle\TwigBundle\TwigBundle::class => ['all' => true], | ||
Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle::class => ['all' => true], | ||
AppBundle\AppBundle::class => ['all' => true], | ||
FOS\RestBundle\FOSRestBundle::class => ['test' => true], | ||
JMS\SerializerBundle\JMSSerializerBundle::class => ['test' => true], | ||
Bazinga\Bundle\HateoasBundle\BazingaHateoasBundle::class => ['test' => true], | ||
Fidry\AliceDataFixtures\Bridge\Symfony\FidryAliceDataFixturesBundle::class => ['test' => true], | ||
Nelmio\Alice\Bridge\Symfony\NelmioAliceBundle::class => ['test' => true], | ||
winzou\Bundle\StateMachineBundle\winzouStateMachineBundle::class => ['test' => true, 'test_without_fosrest' => true], | ||
]; |
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