Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 23 additions & 1 deletion src/DependencyInjection/TaskExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,34 @@
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
use Task\Event\Events;
use Task\TaskBundle\EventListener\DoctrineTaskExecutionListener;
use Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface;

/**
* Container extension for php-task library.
*/
class TaskExtension extends Extension
class TaskExtension extends Extension implements PrependExtensionInterface
{
public function prepend(ContainerBuilder $container)
{
if ($container->hasExtension('doctrine')) {
$container->prependExtensionConfig(
'doctrine',
[
'orm' => [
'mappings' => [
'TaskBundle' => [
'type' => 'xml',
'dir' => __DIR__ . '/../Resources/config/doctrine',
'prefix' => 'Task\TaskBundle\Entity',
'alias' => 'TaskBundle',
],
],
],
]
);
}
}

/**
* {@inheritdoc}
*/
Expand Down
2 changes: 1 addition & 1 deletion tests/app/config/config.doctrine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ task:
doctrine:
orm:
auto_generate_proxy_classes: '%kernel.debug%'
auto_mapping: true
auto_mapping: false
dbal:
driver: pdo_sqlite
host: localhost
Expand Down
Loading