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

MUL-246 - adds migration for cms plugin, updates installation config #477

Merged
merged 2 commits into from
Nov 12, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
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