Skip to content

Commit

Permalink
Merge pull request #394 from doctrine/fix-odm-command
Browse files Browse the repository at this point in the history
fix command setup: load fixtures is only for phpcr-odm and breaks the container without
  • Loading branch information
dbu authored Feb 19, 2024
2 parents fe81f21 + c1a0549 commit 315d435
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ Changelog
* If no username is defined for a session, and if you use Jackalope >= 2.0, the
credentials service for this session is no longer created and `null` is
passed as credentials.
* `doctrine:phpcr:fixtures:load` is now only visible if PHPCR-ODM is available. In version 2, you would get an error when
running the command without PHPCR-ODM.

Version 2
=========
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<?php

namespace Doctrine\Bundle\PHPCRBundle\Command;
namespace Doctrine\Bundle\PHPCRBundle\OptionalCommand\ODM;

use Doctrine\Bundle\PHPCRBundle\Command\DoctrineCommandHelper;
use Doctrine\Bundle\PHPCRBundle\DataFixtures\PHPCRExecutor;
use Doctrine\Bundle\PHPCRBundle\Initializer\InitializerManager;
use Doctrine\Common\DataFixtures\Loader;
Expand Down
4 changes: 0 additions & 4 deletions src/Resources/config/commands.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">

<services>
<service id="Doctrine\Bundle\PHPCRBundle\Command\LoadFixtureCommand" class="Doctrine\Bundle\PHPCRBundle\Command\LoadFixtureCommand">
<argument type="service" id="doctrine_phpcr.initializer_manager"/>
<tag name="console.command"/>
</service>
<service id="Doctrine\Bundle\PHPCRBundle\Command\WorkspaceQueryCommand" class="Doctrine\Bundle\PHPCRBundle\Command\WorkspaceQueryCommand">
<tag name="console.command"/>
</service>
Expand Down
5 changes: 5 additions & 0 deletions src/Resources/config/odm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -97,5 +97,10 @@
<argument />
</service>

<service id="Doctrine\Bundle\PHPCRBundle\Command\LoadFixtureCommand" class="Doctrine\Bundle\PHPCRBundle\OptionalCommand\ODM\LoadFixtureCommand">
<argument type="service" id="doctrine_phpcr.initializer_manager"/>
<tag name="console.command"/>
</service>

</services>
</container>

0 comments on commit 315d435

Please sign in to comment.