Skip to content
This repository was archived by the owner on Jan 31, 2020. It is now read-only.

Commit 117d81c

Browse files
committed
Check for doctrine migrations
1 parent 14377b3 commit 117d81c

File tree

5 files changed

+680
-4
lines changed

5 files changed

+680
-4
lines changed

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ It currently ships with the following Diagnostic Checks:
2626
* [Redis](#redis) - Validate that a Redis service is running,
2727
* [SecurityAdvisory](#securityadvisory) - check installed composer dependencies against SensioLabs SA database,
2828
* [StreamWrapperExists](#streamwrapperexists) - make sure given stream wrapper is available.
29+
* [DoctrineMigration](#doctrinemigration) - make sure all migrations are applied.
2930

3031
File validation checks:
3132

@@ -578,6 +579,21 @@ $checkCompression = new StreamWrapperExists(array(
578579
));
579580
````
580581

582+
### DoctrineMigration
583+
584+
Make sure all migrations are applied:
585+
586+
````php
587+
<?php
588+
use Doctrine\DBAL\Migrations\Configuration\Configuration;
589+
use Doctrine\ORM\EntityManager;
590+
use ZendDiagnostics\Check\DoctrineMigration;
591+
592+
$em = EntityManager::create(/** config */);
593+
$migrationConfig = new Configuration($em);
594+
$check = new DoctrineMigration($migrationConfig);
595+
````
596+
581597
### IniFile
582598

583599
Read an INI-file from the given path and try to parse it.

composer.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,17 @@
2525
"guzzle/plugin-mock" : "3.*",
2626
"videlalvaro/php-amqplib" : "2.*",
2727
"predis/predis" : "0.8.*",
28-
"phpunit/phpunit" : "4.7.*"
28+
"phpunit/phpunit" : "4.7.*",
29+
"doctrine/migrations" : "~1.0@dev"
2930
},
3031
"suggest" : {
3132
"ext-bcmath" : "Required by Check\\CpuPerformance",
3233
"sensiolabs/security-checker": "Required by Check\\SecurityAdvisory",
3334
"symfony/yaml": "Required by Check\\YamlFile",
3435
"guzzle/http": "Required by Check\\GuzzleHttpService",
3536
"predis/predis": "Required by Check\\Redis",
36-
"videlalvaro/php-amqplib": "Required by Check\\RabbitMQ"
37+
"videlalvaro/php-amqplib": "Required by Check\\RabbitMQ",
38+
"doctrine/migrations": "Required by Check\\DoctrineMigration"
3739
},
3840
"extra": {
3941
"branch-alias": {

0 commit comments

Comments
 (0)