Skip to content

Conversation

@HypeMC
Copy link
Member

@HypeMC HypeMC commented Nov 16, 2025

Q A
License MIT
Doc issue/PR doctrine/DoctrineMigrationsBundle#629

@symfony-recipes-bot symfony-recipes-bot enabled auto-merge (squash) November 16, 2025 15:19
@github-actions
Copy link

Thanks for the PR 😍

How to test these changes in your application

  1. Define the SYMFONY_ENDPOINT environment variable:

    # On Unix-like (BSD, Linux and macOS)
    export SYMFONY_ENDPOINT=https://raw.githubusercontent.com/symfony/recipes/flex/pull-1480/index.json
    # On Windows
    SET SYMFONY_ENDPOINT=https://raw.githubusercontent.com/symfony/recipes/flex/pull-1480/index.json
  2. Install the package(s) related to this recipe:

    composer req symfony/flex
    composer req 'doctrine/doctrine-migrations-bundle:^3.7'
  3. Don't forget to unset the SYMFONY_ENDPOINT environment variable when done:

    # On Unix-like (BSD, Linux and macOS)
    unset SYMFONY_ENDPOINT
    # On Windows
    SET SYMFONY_ENDPOINT=

Diff between recipe versions

In order to help with the review stage, I'm in charge of computing the diff between the various versions of patched recipes.
I'm going keep this comment up to date with any updates of the attached patch.

doctrine/doctrine-migrations-bundle

1.2 vs 2.2
diff --git a/doctrine/doctrine-migrations-bundle/1.2/config/packages/doctrine_migrations.yaml b/doctrine/doctrine-migrations-bundle/2.2/config/packages/doctrine_migrations.yaml
index 08e7f078..61e66124 100644
--- a/doctrine/doctrine-migrations-bundle/1.2/config/packages/doctrine_migrations.yaml
+++ b/doctrine/doctrine-migrations-bundle/2.2/config/packages/doctrine_migrations.yaml
@@ -1,5 +1,5 @@
 doctrine_migrations:
-    dir_name: '%kernel.project_dir%/migrations'
-    # namespace is arbitrary but should be different from App\Migrations
-    # as migrations classes should NOT be autoloaded
-    namespace: DoctrineMigrations
+    migrations_paths:
+        # namespace is arbitrary but should be different from App\Migrations
+        # as migrations classes should NOT be autoloaded
+        'DoctrineMigrations': '%kernel.project_dir%/migrations'
2.2 vs 3.1
diff --git a/doctrine/doctrine-migrations-bundle/2.2/config/packages/doctrine_migrations.yaml b/doctrine/doctrine-migrations-bundle/3.1/config/packages/doctrine_migrations.yaml
index 61e66124..29231d94 100644
--- a/doctrine/doctrine-migrations-bundle/2.2/config/packages/doctrine_migrations.yaml
+++ b/doctrine/doctrine-migrations-bundle/3.1/config/packages/doctrine_migrations.yaml
@@ -3,3 +3,4 @@ doctrine_migrations:
         # namespace is arbitrary but should be different from App\Migrations
         # as migrations classes should NOT be autoloaded
         'DoctrineMigrations': '%kernel.project_dir%/migrations'
+    enable_profiler: false
3.1 vs 3.7
diff --git a/doctrine/doctrine-migrations-bundle/3.1/config/packages/doctrine_migrations.yaml b/doctrine/doctrine-migrations-bundle/3.7/config/packages/doctrine_migrations.yaml
index 29231d94..6aaf6627 100644
--- a/doctrine/doctrine-migrations-bundle/3.1/config/packages/doctrine_migrations.yaml
+++ b/doctrine/doctrine-migrations-bundle/3.7/config/packages/doctrine_migrations.yaml
@@ -1,6 +1,9 @@
 doctrine_migrations:
+    enable_service_migrations: false
     migrations_paths:
-        # namespace is arbitrary but should be different from App\Migrations
-        # as migrations classes should NOT be autoloaded
+        # The namespace is arbitrary but should be different from App\Migrations
+        # as migrations classes should NOT be autoloaded unless enable_service_migrations is true
         'DoctrineMigrations': '%kernel.project_dir%/migrations'
+        # If enable_service_migrations is set to true, migrations MUST be discoverable by the autoloader:
+        # 'App\Migrations': '%kernel.project_dir%/src/Migrations'
     enable_profiler: false

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant