marein / symfony-lock-doctrine-migrations-bundle
Perform concurrent doctrine migrations safely.
Installs: 61 252
Dependents: 0
Suggesters: 0
Security: 0
Stars: 5
Watchers: 1
Forks: 0
Open Issues: 1
Type:symfony-bundle
Requires
- php: ^8.0
- doctrine/dbal: ^2.12 || ^3.0 || ^4.0
- doctrine/doctrine-bundle: ^2.2
- doctrine/doctrine-migrations-bundle: ^3.0
- symfony/config: ^5.2 || ^6.0 || ^7.0
- symfony/console: ^5.2 || ^6.0 || ^7.0
- symfony/dependency-injection: ^5.2 || ^6.0 || ^7.0
- symfony/http-foundation: ^5.2 || ^6.0 || ^7.0
- symfony/http-kernel: ^5.2 || ^6.0 || ^7.0
Requires (Dev)
- phpstan/phpstan: 1.10.50
- phpunit/phpunit: ^9.5
- squizlabs/php_codesniffer: 3.6.1
- symfony/framework-bundle: ^5.2 || ^6.0 || ^7.0
This package is auto-updated.
Last update: 2025-03-29 22:55:27 UTC
README
Table of contents
Overview
Perform concurrent doctrine migrations safely.
How it works?
It hooks into Symfony's event system and listens for the doctrine:migrations:migrate
command to be executed.
The command must be executed with the --conn
option so that this bundle knows which connection to use.
If the platform of the selected connection is supported, the operation is performed inside a distributed lock.
Supported platforms:
- MySQL
- PostgreSQL
Installation and requirements
Add the bundle to your project.
composer require marein/symfony-lock-doctrine-migrations-bundle
Add the bundle in the kernel. This can be different for your setup.
public function registerBundles() { return [ // ... new \Marein\LockDoctrineMigrationsBundle\MareinLockDoctrineMigrationsBundle(), // ... ]; }
Configuration
This is an example of all configurations in yaml format.
marein_lock_doctrine_migrations: # Define a prefix for the name of the lock. # # Type: string # Default: migrate__ lock_name_prefix: custom__
Public api
Only the bundle configuration is part of the public api. Everything else can change and is not considered a breaking change. Please don't use classes or services directly.