Permalink
Browse files

Updated to match the latest Symfony changes

  • Loading branch information...
stof committed Feb 16, 2011
1 parent 4ea7b80 commit 6fd574b721c19761bb7a0560670c0ea6a877a7f3
@@ -15,7 +15,7 @@ class Configuration
public function getConfigTree()
{
$treeBuilder = new TreeBuilder();
- $rootNode = $treeBuilder->root('stof_doctrine_extension:config', 'array');
+ $rootNode = $treeBuilder->root('stof_doctrine_extensions', 'array');
$this->addVendorConfig($rootNode, 'orm');
$this->addVendorConfig($rootNode, 'mongodb');
@@ -8,12 +8,12 @@
use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\ContainerBuilder;
-class DoctrineExtensionsExtension extends Extension
+class StofDoctrineExtensionsExtension extends Extension
{
protected $entityManagers = array();
protected $documentManagers = array();
- public function configLoad(array $configs, ContainerBuilder $container)
+ public function load(array $configs, ContainerBuilder $container)
{
$processor = new Processor();
$configuration = new Configuration();
View
@@ -75,15 +75,16 @@ See the official documentation_ for details.
for ORM::
# app/config.yml
- doctrine.orm:
- mappings:
- StofDoctrineExtensionsBundle: ~
- # ... your others bundle
+ doctrine:
+ orm:
+ mappings:
+ StofDoctrineExtensionsBundle: ~
+ # ... your others bundle
or for MongoDB ODM::
# app/config.yml
- doctrine_odm.mongodb:
+ doctrine_mongo_db:
mappings:
StofDoctrineExtensionsBundle: ~
# ... your others bundle
@@ -106,15 +107,15 @@ default).
in YAML::
# app/config.yml
- app.config:
+ framework:
session:
default_locale: en_US
or in XML::
<!-- app/config.xml -->
<container>
- <app:config>
+ <framework:config>
<app:session default-locale="en_US">
</app:config>
</container>
@@ -130,7 +131,7 @@ manager when using mongoDB
in YAML::
# app/config.yml
- stof_doctrine_extensions.config:
+ stof_doctrine_extensions:
orm:
default: ~
mongodb:
@@ -214,7 +215,7 @@ some of them explicitely.
in YAML::
# app/config.yml
- stof_doctrine_extensions.config:
+ stof_doctrine_extensions:
orm:
default:
tree: false
@@ -260,7 +261,7 @@ in the configuration.
in YAML::
# app/config.yml
- stof_doctrine_extensions.config:
+ stof_doctrine_extensions:
class:
orm:
tree: MyBundle\TreeListener
@@ -11,9 +11,9 @@ class StofDoctrineExtensionsBundle extends Bundle
/**
* {@inheritdoc}
*/
- public function registerExtensions(ContainerBuilder $container)
+ public function build(ContainerBuilder $container)
{
- parent::registerExtensions($container);
+ parent::build($container);
$container->addCompilerPass(new ValidateExtensionConfigurationPass());
}
}

0 comments on commit 6fd574b

Please sign in to comment.