forked from shopware/administration
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Administration.php
27 lines (21 loc) · 1.12 KB
/
Administration.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?php declare(strict_types=1);
namespace Shopware\Administration;
use Shopware\Core\Framework\Bundle;
use Shopware\Core\Framework\Migration\MigrationSource;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
class Administration extends Bundle
{
public function build(ContainerBuilder $container): void
{
parent::build($container);
$loader = new XmlFileLoader($container, new FileLocator(__DIR__ . '/DependencyInjection/'));
$loader->load('services.xml');
// configure migration directories
$migrationSourceV4 = $container->getDefinition(MigrationSource::class . '.core.V6_4');
$migrationSourceV4->addMethodCall('addDirectory', [$this->getMigrationPath() . '/V6_4', $this->getMigrationNamespace() . '\V6_4']);
// we've moved the migrations from Shopware\Core\Migration to Shopware\Core\Migration\v6_4
$migrationSourceV4->addMethodCall('addReplacementPattern', ['#^(Shopware\\\\Administration\\\\Migration\\\\)V6_4\\\\([^\\\\]*)$#', '$1$2']);
}
}