Skip to content

Commit

Permalink
Move specific loading to the preprend method
Browse files Browse the repository at this point in the history
  • Loading branch information
Prometee committed Oct 28, 2024
1 parent 6706898 commit abd682b
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/DependencyInjection/FluxSESyliusPayumStripeExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@
use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Extension\Extension;
use Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface;
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;

class FluxSESyliusPayumStripeExtension extends Extension
class FluxSESyliusPayumStripeExtension extends Extension implements PrependExtensionInterface
{
/**
* @throws Exception
Expand Down Expand Up @@ -47,6 +48,14 @@ public function load(array $configs, ContainerBuilder $container): void
new FileLocator(dirname(__DIR__) . '/Resources/config'),
);
$loader->load('services.yaml');
}

public function prepend(ContainerBuilder $container): void
{
$loader = new YamlFileLoader(
$container,
new FileLocator(dirname(__DIR__) . '/Resources/config'),
);

if ($container->hasExtension('sylius_state_machine_abstraction')) {
$loader->load('services/abstraction/abstraction.yaml');
Expand Down

0 comments on commit abd682b

Please sign in to comment.