Skip to content

Commit

Permalink
MUL-246 - adds migration for cms plugin, updates installation config
Browse files Browse the repository at this point in the history
  • Loading branch information
MacBalc committed May 24, 2023
1 parent 61e53fb commit 3408faa
Show file tree
Hide file tree
Showing 3 changed files with 147 additions and 2 deletions.
1 change: 0 additions & 1 deletion doc/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ you will probably need to change the extension of the imported file in

```
$ bin/console cache:clear
$ bin/console doctrine:migrations:diff
$ bin/console doctrine:migrations:migrate
$ bin/console assets:install --symlink
$ bin/console sylius:theme:assets:install --symlink
Expand Down
26 changes: 25 additions & 1 deletion src/DependencyInjection/BitBagSyliusCmsExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,36 @@

namespace BitBag\SyliusCmsPlugin\DependencyInjection;

use Sylius\Bundle\CoreBundle\DependencyInjection\PrependDoctrineMigrationsTrait;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Extension\Extension;
use Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface;

final class BitBagSyliusCmsExtension extends Extension
final class BitBagSyliusCmsExtension extends Extension implements PrependExtensionInterface
{
use PrependDoctrineMigrationsTrait;

public function load(array $configs, ContainerBuilder $container): void
{
}

public function prepend(ContainerBuilder $container): void
{
$this->prependDoctrineMigrations($container);
}

protected function getMigrationsNamespace(): string
{
return 'BitBag\SyliusCmsPlugin\Migrations';
}

protected function getMigrationsDirectory(): string
{
return '@BitBagSyliusCmsPlugin/Migrations';
}

protected function getNamespacesOfMigrationsExecutedBefore(): array
{
return ['Sylius\Bundle\CoreBundle\Migrations'];
}
}
Loading

0 comments on commit 3408faa

Please sign in to comment.