abacaphiliac/doctrine-orm-diagnostics-module

Integration of doctrine/doctrine-orm-module, zendframework/zenddiagnostics, and (optionally) doctrine/migrations.

0.1.2 2016-06-22 22:00 UTC

This package is auto-updated.

Last update: 2024-12-25 12:13:58 UTC


README

Scrutinizer Code Quality Code Coverage Build Status

abacaphiliac/doctrine-orm-diagnostics-module

Integration of doctrine/doctrine-orm-module and zendframework/zenddiagnostics. Provides ZF2 Diagnostic checks of Doctrine ORM Connection(s) and Schema.

Installation

composer require abacaphiliac/doctrine-orm-diagnostics-module

Usage

Add Abacaphiliac\DoctrineORMDiagnosticsModule to your application module config.

What can I do if I don't use orm_default?

Create your own CheckConnectionFactory (a very simple factory) and override the doctrine.orm_diagnostics.connection service in your application's service_manager.factories config.

Sample Output

[vagrant@vagrant]$ php public/index.php diag -v --debug
  OK   ZF: PHP Version: Current PHP version is 5.6.5
       ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
       '5.6.5'
       ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  OK   DoctrineORMModule: Database Connection: Doctrine\DBAL\Connections\MasterSlaveConnection
       ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
       array (
         'slave' => 'connected',
         'master' => 'connected',
       )
       ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 FAIL  DoctrineORMModule: ORM Validate Schema: Doctrine\ORM\Tools\Console\Command\ValidateSchemaCommand
       ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
       array (
         0 => '[Mapping]  OK - The mapping files are correct.',
         1 => '[Database] FAIL - The database schema is not in sync with the current mapping file.',
       )
       ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1 failures, 0 warnings, 2 successful checks.

Dependencies

See composer.json.

Contributing

composer update && vendor/bin/phing

This library attempts to comply with PSR-1, PSR-2, and PSR-4. If you notice compliance oversights, please send a patch via pull request.