Skip to content

Commit 99f269d

Browse files
Merge pull request #5 from louismariegaborit/master
Compatibility Symfony 4
2 parents e0cb916 + 3869b5b commit 99f269d

File tree

4 files changed

+16
-5
lines changed

4 files changed

+16
-5
lines changed

DependencyInjection/DoctrineMigrationToolsExtension.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
namespace A5sys\DoctrineMigrationToolsBundle\DependencyInjection;
44

5+
use Symfony\Component\Config\FileLocator;
6+
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
57
use Symfony\Component\DependencyInjection\ContainerBuilder;
68
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
79

@@ -17,5 +19,10 @@ public function load(array $configs, ContainerBuilder $container)
1719
{
1820
$configuration = new Configuration();
1921
$this->processConfiguration($configuration, $configs);
22+
23+
$locator = new FileLocator(__DIR__.'/../Resources/config/');
24+
$loader = new YamlFileLoader($container, $locator);
25+
26+
$loader->load('services.yml');
2027
}
2128
}

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ Tools for the doctrine migration bundle
66

77
composer require a5sys/doctrine-migration-tools-bundle:dev-master
88

9-
# Generate versions from schema file for the doctrine-migration
9+
# Generate versions from schema file for the doctrine-migration
1010
The diff command of doctrine generate the version file from the diff between your database and the current schema.
1111

1212
This command generate the version from the diff between the schema stored in a file and your current schema.
1313

1414
So you only have to run the command before doing a new version of your app.
1515

16-
php app/console doctrine:migrations:diff-file
16+
php bin/console doctrine:migrations:diff-file
1717

1818
A version file will be generated (if required) and your current schema will be dumped in a file. (in /app/DoctrineMigrations/SchemaVersion)

Resources/config/services.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
services:
2+
A5sys\DoctrineMigrationToolsBundle\Command\MigrationsDiffFileDoctrineCommand:
3+
public: false
4+
tags: [console.command]

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
},
77
"license": "MIT",
88
"require": {
9-
"php": ">=5.4.0",
10-
"symfony/framework-bundle": "~2.3|~3.0",
9+
"php": ">=7.1",
10+
"symfony/framework-bundle": "~4.0",
1111
"doctrine/doctrine-bundle": "~1.0",
12-
"doctrine/migrations": "~1.4"
12+
"doctrine/migrations": "~1.6"
1313
}
1414
}

0 commit comments

Comments
 (0)