abacaphiliac / doctrine-orm-diagnostics-module
Integration of doctrine/doctrine-orm-module, zendframework/zenddiagnostics, and (optionally) doctrine/migrations.
Requires
- php: >=5.5
- doctrine/dbal: ^2.5.4
- doctrine/doctrine-module: ^1.0
- doctrine/doctrine-orm-module: ^0.10.0
- symfony/console: ^3.0
- zendframework/zend-console: ^2.0
- zendframework/zend-modulemanager: ^2.0
- zendframework/zenddiagnostics: ^1.0
- zendframework/zftool: ^0.1.0
Requires (Dev)
- jakub-onderka/php-parallel-lint: ^0.9
- mikey179/vfsstream: ^1.6
- phing/phing: ^2.9
- phpunit/phpunit: ^5.4|^4.8
- squizlabs/php_codesniffer: ^2.2
This package is auto-updated.
Last update: 2024-12-25 12:13:58 UTC
README
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.