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

Remove --service option from doctrine:mongodb:fixtures:load command #799

Merged
merged 1 commit into from
Dec 10, 2023

Conversation

GromNaN
Copy link
Member

@GromNaN GromNaN commented Dec 9, 2023

Fix #650
This option was deprecated, using services is the only behavior, used by default.

@GromNaN GromNaN requested a review from franmomu December 9, 2023 19:36
@GromNaN GromNaN added the Task label Dec 9, 2023
@GromNaN GromNaN added this to the 5.0.0 milestone Dec 9, 2023

/**
* Load data fixtures from bundles.
*/
class LoadDataFixturesDoctrineODMCommand extends DoctrineODMCommand
{
public function __construct(?ManagerRegistry $registry = null, ?KernelInterface $kernel = null, private ?SymfonyFixturesLoaderInterface $fixturesLoader = null)
public function __construct(ManagerRegistry $registry, private SymfonyFixturesLoaderInterface $fixturesLoader)
{
parent::__construct($registry);
}

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The command is removed in the DI extension instead of being disabled, so the code is more centralized and the dependency to the loader can be required in the constructor.

@franmomu
Copy link
Contributor

@franmomu franmomu linked an issue Dec 10, 2023 that may be closed by this pull request
@GromNaN GromNaN force-pushed the fixtures-command branch 2 times, most recently from 4b74671 to d6a46e0 Compare December 10, 2023 13:08
@GromNaN GromNaN merged commit 95c4ba9 into doctrine:5.0.x Dec 10, 2023
13 checks passed
@GromNaN GromNaN deleted the fixtures-command branch December 10, 2023 13:39
@GromNaN GromNaN mentioned this pull request Dec 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Drop --services option for command loading fixtures
2 participants