@@ 52-69 (lines=18) @@ | ||
49 | /** |
|
50 | * @inheritdoc |
|
51 | */ |
|
52 | public function migrate(ContainerInterface $container): void |
|
53 | { |
|
54 | // read & remember classes to migrate... |
|
55 | assert($container->has(FileSystemInterface::class) === true); |
|
56 | /** @var FileSystemInterface $fileSystem */ |
|
57 | $fileSystem = $container->get(FileSystemInterface::class); |
|
58 | ||
59 | $path = $this->getMigrationsPath(); |
|
60 | assert($fileSystem->exists($path) === true); |
|
61 | ||
62 | $this->getIO()->writeInfo("Migrations `$path` started." . PHP_EOL, IoInterface::VERBOSITY_VERBOSE); |
|
63 | ||
64 | $migrationClasses = $fileSystem->requireFile($path); |
|
65 | $this->setMigrationClasses($migrationClasses); |
|
66 | ||
67 | // ... and run actual migration |
|
68 | parent::migrate($container); |
|
69 | } |
|
70 | ||
71 | /** |
|
72 | * @inheritdoc |
@@ 58-74 (lines=17) @@ | ||
55 | /** |
|
56 | * @inheritdoc |
|
57 | */ |
|
58 | public function run(ContainerInterface $container): void |
|
59 | { |
|
60 | // read & remember seed classes... |
|
61 | assert($container->has(FileSystemInterface::class) === true); |
|
62 | /** @var FileSystemInterface $fileSystem */ |
|
63 | $fileSystem = $container->get(FileSystemInterface::class); |
|
64 | ||
65 | $path = $this->getSeedsPath(); |
|
66 | assert($fileSystem->exists($path) === true); |
|
67 | $this->getIO()->writeInfo("Seeds `$path` started." . PHP_EOL, IoInterface::VERBOSITY_VERBOSE); |
|
68 | ||
69 | $seedClasses = $fileSystem->requireFile($path); |
|
70 | $this->setSeedClasses($seedClasses); |
|
71 | ||
72 | // ... and run actual seeding |
|
73 | parent::run($container); |
|
74 | } |
|
75 | ||
76 | /** |
|
77 | * @param string[] $seedClasses |