-
Notifications
You must be signed in to change notification settings - Fork 1
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 #10 from ElectricMaxxx/improvements
increase symfony version bandwidth
- Loading branch information
Showing
9 changed files
with
151 additions
and
3 deletions.
There are no files selected for viewing
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
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
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
$container->loadFromExtension('doctrine_orm_phpcr_adapter', array( | ||
'managers' => array( | ||
'reference-phpcr' => array('default' => 'doctrine_phpcr.odm.default_document_manager'), | ||
'reference-dbal-orm' => array('default' => 'doctrine.orm.default_entity_manager'), | ||
), | ||
'adapter' => array( | ||
'auto_mapping' => true, | ||
'auto_generate_proxy_classes' => true, | ||
'mappings' => array( | ||
'test_mapping' => array( | ||
'type' => 'annotation', | ||
'prefix' => '\Entity', | ||
'dir' => '%kernel.root_dir%/../Entity', | ||
'is_bundle' => false, | ||
), | ||
), | ||
), | ||
)); |
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
doctrine_orm_phpcr_adapter: | ||
managers: | ||
reference-phpcr: | ||
default: doctrine_phpcr.odm.default_document_manager | ||
reference-dbal-orm: | ||
default: doctrine.orm.default_entity_manager | ||
adapter: | ||
mapping: true | ||
auto_generate_proxy_classes: true | ||
mappings: | ||
test_mapping: | ||
type: annotation | ||
dir: %kernel.root_dir%/../Entity | ||
prefix: \Entity | ||
is_bundle: true | ||
|
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?php | ||
$routeCollection = new \Symfony\Component\Routing\RouteCollection(); | ||
|
||
|
||
return $routeCollection; |
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 |
---|---|---|
@@ -0,0 +1,69 @@ | ||
<?php | ||
|
||
namespace Doctrine\ORM\Bundle\DoctrineOrmPhpcrAdapterBundle\Tests\Unit\DependencyInjection; | ||
|
||
use Doctrine\ORM\Bundle\DoctrineOrmPhpcrAdapterBundle\DependencyInjection\Configuration; | ||
use Doctrine\ORM\Bundle\DoctrineOrmPhpcrAdapterBundle\DependencyInjection\DoctrineOrmPhpcrAdapterExtension; | ||
use Matthias\SymfonyDependencyInjectionTest\PhpUnit\AbstractExtensionConfigurationTestCase; | ||
|
||
/** | ||
* @author Maximilian Berghoff <Maximilian.Berghoff@gmx.de> | ||
*/ | ||
class ConfigurationTest extends AbstractExtensionConfigurationTestCase | ||
{ | ||
protected function getContainerExtension() | ||
{ | ||
return new DoctrineOrmPhpcrAdapterExtension(); | ||
} | ||
|
||
protected function getConfiguration() | ||
{ | ||
return new Configuration(); | ||
} | ||
|
||
public function testDefaultsForAllConfigFormats() | ||
{ | ||
$expectedConfiguration = array( | ||
'managers' => array( | ||
array('name' => 'default', 'service' => 'doctrine_phpcr.odm.default_document_manager', 'type' => 'reference-phpcr'), | ||
array('name' => 'default', 'service' => 'doctrine.orm.default_entity_manager', 'type' => 'reference-dbal-orm'), | ||
array('name' => 'default', 'service' => 'doctrine_phpcr.odm.default_document_manager', 'type' => 'reference-phpcr'), // remove that duplication, when i find that | ||
array('name' => 'default', 'service' => 'doctrine.orm.default_entity_manager', 'type' => 'reference-dbal-orm'), | ||
), | ||
'adapter' => array( | ||
'auto_generate_proxy_classes' => true, | ||
'default_adapter_manager' => 'default', | ||
'adapter_managers' => array( | ||
'default' => array( | ||
'mappings' => array( | ||
'test_mapping' => array( | ||
'type' => 'annotation', | ||
'prefix' => '\Entity', | ||
'dir' => '%kernel.root_dir%/../Entity', | ||
'is_bundle' => false, | ||
'mapping' => true, | ||
), | ||
), | ||
'auto_mapping' => true, | ||
'metadata_cache_driver' => array( | ||
'type' => 'array', | ||
), | ||
'class_metadata_factory_name' => 'Doctrine\ORM\ODMAdapter\Mapping\ClassMetadataFactory', | ||
), | ||
), | ||
'proxy_dir' => '%kernel.cache_dir%/doctrine/PHPCRProxies', | ||
'proxy_namespace' => 'PHPCRProxies' | ||
), | ||
); | ||
|
||
$sources = array_map(function ($path) { | ||
return __DIR__.'/../../Resources/Fixtures/'.$path; | ||
}, array( | ||
'config/config.yml', | ||
'config/config.php', | ||
)); | ||
|
||
$this->assertProcessedConfigurationEquals($expectedConfiguration, $sources); | ||
} | ||
} | ||
|
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
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
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