-
Notifications
You must be signed in to change notification settings - Fork 107
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #174 from greg0ire/fix_caching_issue
Implement configuration outside the pass
- Loading branch information
Showing
3 changed files
with
22 additions
and
41 deletions.
There are no files selected for viewing
36 changes: 0 additions & 36 deletions
36
DependencyInjection/Compiler/RegisterExtendedDataTypePass.php
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -3,13 +3,15 @@ | |
namespace JMS\Payment\CoreBundle\DependencyInjection; | ||
|
||
use JMS\Payment\CoreBundle\DependencyInjection\Configuration; | ||
use Symfony\Component\Config\FileLocator; | ||
use JMS\Payment\CoreBundle\Entity\ExtendedDataType; | ||
use Symfony\Component\Config\Definition\Processor; | ||
use Symfony\Component\Config\FileLocator; | ||
use Symfony\Component\DependencyInjection\ContainerBuilder; | ||
use Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface; | ||
use Symfony\Component\DependencyInjection\Loader\XmlFileLoader; | ||
use Symfony\Component\DependencyInjection\Reference; | ||
use Symfony\Component\HttpKernel\DependencyInjection\Extension; | ||
use Symfony\Component\HttpKernel\Kernel; | ||
use Symfony\Component\HttpKernel\Kernel; | ||
|
||
/* | ||
* Copyright 2010 Johannes M. Schmitt <[email protected]> | ||
|
@@ -27,8 +29,19 @@ | |
* limitations under the License. | ||
*/ | ||
|
||
class JMSPaymentCoreExtension extends Extension | ||
class JMSPaymentCoreExtension extends Extension implements PrependExtensionInterface | ||
{ | ||
public function prepend(ContainerBuilder $container) | ||
{ | ||
$container->prependExtensionConfig('doctrine', array( | ||
'dbal' => array( | ||
'types' => array( | ||
ExtendedDataType::NAME => 'JMS\Payment\CoreBundle\Entity\ExtendedDataType' | ||
) | ||
) | ||
)); | ||
} | ||
|
||
public function load(array $configs, ContainerBuilder $container) | ||
{ | ||
$xmlLoader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); | ||
|
@@ -46,4 +59,4 @@ public function load(array $configs, ContainerBuilder $container) | |
$container->removeDefinition('payment.form.choose_payment_method_type'); | ||
} | ||
} | ||
} | ||
} |
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