diff --git a/DependencyInjection/Compiler/BuildConfigsPass.php b/DependencyInjection/Compiler/BuildConfigsPass.php index 4b8f6492..3364b004 100644 --- a/DependencyInjection/Compiler/BuildConfigsPass.php +++ b/DependencyInjection/Compiler/BuildConfigsPass.php @@ -1,7 +1,6 @@ getDefinition('payum.builder'); + if ($container->hasDefinition('twig')) { + $config = ['twig.env' => '@twig']; + + $builder->addMethodCall('addCoreGatewayFactoryConfig', [$config]); + } + if (false == empty($configs[0])) { $builder->addMethodCall('addCoreGatewayFactoryConfig', [$configs[0]]); } diff --git a/DependencyInjection/PayumExtension.php b/DependencyInjection/PayumExtension.php index 75f3d92b..75fd2160 100644 --- a/DependencyInjection/PayumExtension.php +++ b/DependencyInjection/PayumExtension.php @@ -115,8 +115,6 @@ protected function loadCoreGateway(array $config, ContainerBuilder $container) 'PayumSymfonyBridge' => dirname((new \ReflectionClass(ReplyToSymfonyResponseConverter::class))->getFileName()).'/Resources/views', ], - 'twig.env' => new Reference('twig'), - 'payum.action.get_http_request' => new Reference('payum.action.get_http_request'), 'payum.action.obtain_credit_card' => new Reference('payum.action.obtain_credit_card_builder'), ]; diff --git a/composer.json b/composer.json index 202edf5d..12a21456 100644 --- a/composer.json +++ b/composer.json @@ -38,9 +38,8 @@ ], "require": { "php": "^5.5.0|^7.0", - "payum/core": "^1.3", + "payum/core": "^1.3.3", "symfony/framework-bundle": "~2.8|~3.0", - "symfony/twig-bundle": "~2.8|~3.0", "symfony/form": "~2.8|~3.0", "symfony/validator": "~2.8|~3.0" },