This library provides Doctrine's schema validation in Symfony projects as a GrumPHP task.
Note: this task is made for Symfony projects, it uses 'bin/console' so you don't have to configure the Doctrine CLI.
You can install the package via composer:
composer require --dev jonmldr/grumphp-doctrine-task
# grumphp.yml
grumphp:
tasks:
doctrine_schema_validate:
skip_mapping: false
skip_sync: false
skip_property_types: false
em: default
triggered_by: ['php', 'xml', 'yml']
extensions:
- JonMldr\GrumPhpDoctrineTask\ExtensionLoaderFor multiple entity managers you can specify the entity manager to be used:
# grumphp.yml
grumphp:
tasks:
doctrine_schema_validate_application:
em: application
metadata:
task: doctrine_schema_validate
doctrine_schema_validate_reporting:
em: reporting
metadata:
task: doctrine_schema_validate
extensions:
- JonMldr\GrumPhpDoctrineTask\ExtensionLoaderconsole_path
Default: 'bin/console'
With this parameter you can set the path of the console to be used.
skip_mapping
Default: false
With this parameter you can skip the mapping validation check.
skip_sync
Default: false
With this parameter you can skip checking if the mapping is in sync with the database.
triggered_by
Default: [php, xml, yml]
This is a list of extensions that should trigger the Doctrine task.
em
Default: null
Require doctrine/orm >= 3.0.
Specify the entity manager to be used. If not set, the default entity manager will be used.
skip_property_types
Default: null
Require doctrine/orm >= 3.0.
With this parameter you can skip checking if property types match the Doctrine types.
- Added
docker-compose.ymlfile for local development - Allowed
phpro/grumphpComposer plugin - Updated Dockerfile
- Add
emoption thanks to @majoskorec - Add
skip_property_typesoption thanks to @majoskorec
- Upgraded GrumPHP version to
^2.0thanks to @erkens - Upgraded to new
ExtensionInterfacefor GrumPHP 2.x thanks to @erkens - Changed minimum PHP version to
8.1thanks to @erkens
- Added PHP8 support
- Added
ExtensionLoader, see Configuration. The service definition can be removed if you add the ExtensionLoader to yourgrumphp.yml - Added the
console_pathoption
- Updated to GrumPHP 1.x
- Required PHP version 7.3 or higher (required by GrumPHP 1.x)
- Task is also being executed during manual run
- Option parity with default doctrine task
- Added Docker file for local development
- Removed composer.lock file
The MIT License (MIT). Please see License File for more information.
