Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix command setup: load fixtures is only for phpcr-odm and breaks the container without #394

Merged
merged 1 commit into from
Feb 19, 2024
Merged
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
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>
Loading