Skip to content

Commit 10e80cf

Browse files
committed
Rename compiler passes
1 parent 472bfea commit 10e80cf

File tree

5 files changed

+12
-12
lines changed

5 files changed

+12
-12
lines changed

src/Bundle/DependencyInjection/Compiler/FosRestPass.php renamed to src/Bundle/DependencyInjection/Compiler/UnregisterFosRestDefinitionsPass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
1818
use Symfony\Component\DependencyInjection\ContainerBuilder;
1919

20-
final class FosRestPass implements CompilerPassInterface
20+
final class UnregisterFosRestDefinitionsPass implements CompilerPassInterface
2121
{
2222
public function process(ContainerBuilder $container): void
2323
{

src/Bundle/DependencyInjection/Compiler/HateoasPass.php renamed to src/Bundle/DependencyInjection/Compiler/UnregisterHateoasDefinitionsPass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
1818
use Symfony\Component\DependencyInjection\ContainerBuilder;
1919

20-
final class HateoasPass implements CompilerPassInterface
20+
final class UnregisterHateoasDefinitionsPass implements CompilerPassInterface
2121
{
2222
public function process(ContainerBuilder $container): void
2323
{

src/Bundle/SyliusResourceBundle.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616
use Sylius\Bundle\ResourceBundle\DependencyInjection\Compiler\CsrfTokenManagerPass;
1717
use Sylius\Bundle\ResourceBundle\DependencyInjection\Compiler\DoctrineContainerRepositoryFactoryPass;
1818
use Sylius\Bundle\ResourceBundle\DependencyInjection\Compiler\DoctrineTargetEntitiesResolverPass;
19-
use Sylius\Bundle\ResourceBundle\DependencyInjection\Compiler\FosRestPass;
20-
use Sylius\Bundle\ResourceBundle\DependencyInjection\Compiler\HateoasPass;
2119
use Sylius\Bundle\ResourceBundle\DependencyInjection\Compiler\Helper\TargetEntitiesResolver;
2220
use Sylius\Bundle\ResourceBundle\DependencyInjection\Compiler\PagerfantaBridgePass;
2321
use Sylius\Bundle\ResourceBundle\DependencyInjection\Compiler\RegisterFormBuilderPass;
@@ -27,6 +25,8 @@
2725
use Sylius\Bundle\ResourceBundle\DependencyInjection\Compiler\RegisterResourceStateMachinePass;
2826
use Sylius\Bundle\ResourceBundle\DependencyInjection\Compiler\RegisterStateMachinePass;
2927
use Sylius\Bundle\ResourceBundle\DependencyInjection\Compiler\TwigPass;
28+
use Sylius\Bundle\ResourceBundle\DependencyInjection\Compiler\UnregisterFosRestDefinitionsPass;
29+
use Sylius\Bundle\ResourceBundle\DependencyInjection\Compiler\UnregisterHateoasDefinitionsPass;
3030
use Sylius\Bundle\ResourceBundle\DependencyInjection\Compiler\WinzouStateMachinePass;
3131
use Sylius\Bundle\ResourceBundle\DependencyInjection\PagerfantaExtension;
3232
use Sylius\Resource\Symfony\DependencyIjection\Compiler\DisableMetadataCachePass;
@@ -52,14 +52,14 @@ public function build(ContainerBuilder $container): void
5252
$container->addCompilerPass(new DisableMetadataCachePass());
5353
$container->addCompilerPass(new DoctrineContainerRepositoryFactoryPass());
5454
$container->addCompilerPass(new DoctrineTargetEntitiesResolverPass(new TargetEntitiesResolver()), PassConfig::TYPE_BEFORE_OPTIMIZATION, 1);
55-
$container->addCompilerPass(new FosRestPass());
56-
$container->addCompilerPass(new HateoasPass());
5755
$container->addCompilerPass(new RegisterFormBuilderPass());
5856
$container->addCompilerPass(new RegisterFqcnControllersPass());
5957
$container->addCompilerPass(new RegisterResourceRepositoryPass());
6058
$container->addCompilerPass(new RegisterResourcesPass());
6159
$container->addCompilerPass(new RegisterStateMachinePass());
6260
$container->addCompilerPass(new RegisterResourceStateMachinePass());
61+
$container->addCompilerPass(new UnregisterFosRestDefinitionsPass());
62+
$container->addCompilerPass(new UnregisterHateoasDefinitionsPass());
6363
$container->addCompilerPass(new TwigPass());
6464
$container->addCompilerPass(new WinzouStateMachinePass());
6565

tests/Bundle/DependencyInjection/Compiler/FosRestPassTest.php renamed to tests/Bundle/DependencyInjection/Compiler/UnregisterFosRestDefinitionsPassTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616
use FOS\RestBundle\FOSRestBundle;
1717
use Matthias\SymfonyDependencyInjectionTest\PhpUnit\AbstractCompilerPassTestCase;
1818
use Sylius\Bundle\ResourceBundle\Controller\ViewHandler;
19-
use Sylius\Bundle\ResourceBundle\DependencyInjection\Compiler\FosRestPass;
19+
use Sylius\Bundle\ResourceBundle\DependencyInjection\Compiler\UnregisterFosRestDefinitionsPass;
2020
use Symfony\Component\DependencyInjection\ContainerBuilder;
2121

22-
final class FosRestPassTest extends AbstractCompilerPassTestCase
22+
final class UnregisterFosRestDefinitionsPassTest extends AbstractCompilerPassTestCase
2323
{
2424
/** @test */
2525
public function it_remove_view_handler_if_fos_rest_is_not_available(): void
@@ -46,6 +46,6 @@ protected function registerCompilerPass(ContainerBuilder $container): void
4646
$this->registerService('sylius.resource_controller.view_handler', ViewHandler::class);
4747
$this->setParameter('kernel.bundles', []);
4848

49-
$container->addCompilerPass(new FosRestPass());
49+
$container->addCompilerPass(new UnregisterFosRestDefinitionsPass());
5050
}
5151
}

tests/Bundle/DependencyInjection/Compiler/HateoasPassTest.php renamed to tests/Bundle/DependencyInjection/Compiler/UnregisterHateoasDefinitionsPassTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616
use Bazinga\Bundle\HateoasBundle\BazingaHateoasBundle;
1717
use Hateoas\Representation\Factory\PagerfantaFactory;
1818
use Matthias\SymfonyDependencyInjectionTest\PhpUnit\AbstractCompilerPassTestCase;
19-
use Sylius\Bundle\ResourceBundle\DependencyInjection\Compiler\HateoasPass;
19+
use Sylius\Bundle\ResourceBundle\DependencyInjection\Compiler\UnregisterHateoasDefinitionsPass;
2020
use Symfony\Component\DependencyInjection\ContainerBuilder;
2121

22-
final class HateoasPassTest extends AbstractCompilerPassTestCase
22+
final class UnregisterHateoasDefinitionsPassTest extends AbstractCompilerPassTestCase
2323
{
2424
/** @test */
2525
public function it_remove_pagerfanta_representation_factory_if_hateoas_is_not_available(): void
@@ -46,6 +46,6 @@ protected function registerCompilerPass(ContainerBuilder $container): void
4646
$this->registerService('sylius.resource_controller.pagerfanta_representation_factory', PagerfantaFactory::class);
4747
$this->setParameter('kernel.bundles', []);
4848

49-
$container->addCompilerPass(new HateoasPass());
49+
$container->addCompilerPass(new UnregisterHateoasDefinitionsPass());
5050
}
5151
}

0 commit comments

Comments
 (0)