covex-nn/doctrine-migrations-bundle
covex-nn/doctrine-migrations-bundle appears to be a Symfony-compatible wrapper for Doctrine Migrations, a tool for managing database schema changes incrementally. If the Laravel application uses Doctrine DBAL (e.g., via doctrine/dbal for multi-database support or legacy integrations), this bundle could theoretically bridge migrations between Laravel’s native migrations and Doctrine’s ecosystem. However, Laravel’s native migration system is already robust, and this bundle is Symfony-specific, introducing unnecessary complexity for a Laravel stack.php artisan migrate) is tightly coupled with Eloquent and the framework’s service container. Doctrine Migrations operates independently, requiring manual alignment with Laravel’s autoloading, service providers, and configuration. This could lead to duplication of migration logic or inconsistent schema states if both systems are used concurrently.@ORM\Table annotations, while Laravel uses plain PHP classes with Schema::create() methods. Migrating existing Laravel migrations to Doctrine format would require manual refactoring or a custom migration converter.ContainerInterface, while Laravel uses Illuminate\Container\Container. A facade or adapter layer would be required to bridge the two, adding ~200+ lines of boilerplate.config/packages/doctrine_migrations.yaml, while Laravel relies on config/database.php and service providers. Merging these would require custom configuration merging logic.doctrine/doctrine-migrations-bundle (Symfony) and doctrine/dbal. Laravel’s doctrine/dbal (if used) might conflict with the bundle’s version.autoload_dev.php and Laravel’s composer.json autoloading would need synchronization to avoid class-not-found errors.Schema::create() with @ORM\Table annotations).doctrine/dbal and doctrine/migrations without the bundle to test standalone Doctrine Migrations.Illuminate\Contracts\Container\Container).MigrationRunner to work with Laravel’s Artisan commands.DoctrineMigrationsServiceProvider:
use Doctrine\Migrations\Configuration\Connection\ConnectionConfiguration;
use Doctrine\Migrations\DependencyFactory;
use Illuminate\Support\ServiceProvider;
class DoctrineMigrationsServiceProvider extends ServiceProvider {
public function register() {
$this->app->singleton('doctrine_migrations.dependency_factory', function ($app) {
$config = new ConnectionConfiguration(
$app['db.connection'],
$app['config']['doctrine_migrations.namespace']
);
return DependencyFactory::fromConnectionConfig($config);
});
}
}
php artisan doctrine:migrate:
$this->commands([
\Doctrine\Migrations\Tools\Console\Command\MigrateCommand::class,
\Doctrine\Migrations\Tools\Console\Command\StatusCommand::class,
]);
migrate:rollback behavior.modules/doctrine-migrations) to avoid polluting the core Laravel stack.telescope, laravel-debugbar).How can I help you explore Laravel packages today?