File tree Expand file tree Collapse file tree 4 files changed +24
-8
lines changed Expand file tree Collapse file tree 4 files changed +24
-8
lines changed Original file line number Diff line number Diff line change 6
6
7
7
<!-- commands -->
8
8
<service id =" doctrine.fixtures_load_command" class =" Doctrine\Bundle\FixturesBundle\Command\LoadDataFixturesDoctrineCommand" >
9
- <argument type =" service" id =" doctrine.fixtures.loader " />
9
+ <argument type =" service" id =" doctrine.fixtures.provider " />
10
10
<argument type =" service" id =" doctrine" />
11
11
<tag name =" console.command" command =" doctrine:fixtures:load" />
12
12
</service >
13
13
14
- <service id =" doctrine.fixtures.loader" class =" Doctrine\Bundle\FixturesBundle\Loader\SymfonyFixturesLoader" public =" false" >
15
- <argument type =" service" id =" service_container" />
16
- </service >
14
+ <service id =" doctrine.fixtures.provider" alias =" doctrine.fixtures.loader" />
15
+ <service id =" doctrine.fixtures.loader" class =" Doctrine\Bundle\FixturesBundle\Loader\SymfonyFixturesLoader" />
17
16
18
- <service id =" doctrine.fixtures.purger.orm_purger_factory" class =" Doctrine\Bundle\FixturesBundle\Purger\ORMPurgerFactory" public = " false " >
17
+ <service id =" doctrine.fixtures.purger.orm_purger_factory" class =" Doctrine\Bundle\FixturesBundle\Purger\ORMPurgerFactory" >
19
18
<tag name =" doctrine.fixtures.purger_factory" alias =" default" />
20
19
</service >
21
20
</services >
Original file line number Diff line number Diff line change 6
6
7
7
use Doctrine \Bundle \DoctrineBundle \Command \DoctrineCommand ;
8
8
use Doctrine \Bundle \FixturesBundle \DependencyInjection \CompilerPass \PurgerFactoryCompilerPass ;
9
- use Doctrine \Bundle \FixturesBundle \Loader \SymfonyFixturesLoader ;
9
+ use Doctrine \Bundle \FixturesBundle \Loader \FixturesProvider ;
10
10
use Doctrine \Bundle \FixturesBundle \Purger \ORMPurgerFactory ;
11
11
use Doctrine \Bundle \FixturesBundle \Purger \PurgerFactory ;
12
12
use Doctrine \Common \DataFixtures \Executor \ORMExecutor ;
@@ -30,7 +30,7 @@ final class LoadDataFixturesDoctrineCommand extends DoctrineCommand
30
30
{
31
31
/** @param PurgerFactory[] $purgerFactories */
32
32
public function __construct (
33
- private SymfonyFixturesLoader $ fixturesLoader ,
33
+ private FixturesProvider $ fixturesLoader ,
34
34
ManagerRegistry $ doctrine ,
35
35
/** @var array<string, ORMPurgerFactory> $purgerFactories */
36
36
private array $ purgerFactories = [],
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ declare (strict_types=1 );
4
+
5
+ namespace Doctrine \Bundle \FixturesBundle \Loader ;
6
+
7
+ use Doctrine \Common \DataFixtures \FixtureInterface ;
8
+
9
+ interface FixturesProvider
10
+ {
11
+ /**
12
+ * @param string[] $groups
13
+ *
14
+ * @return FixtureInterface[]
15
+ */
16
+ public function getFixtures (array $ groups = []): array ;
17
+ }
Original file line number Diff line number Diff line change 17
17
use function get_class ;
18
18
use function sprintf ;
19
19
20
- final class SymfonyFixturesLoader extends Loader
20
+ final class SymfonyFixturesLoader extends Loader implements FixturesProvider
21
21
{
22
22
/** @var FixtureInterface[] */
23
23
private array $ loadedFixtures = [];
You can’t perform that action at this time.
0 commit comments