-
-
Notifications
You must be signed in to change notification settings - Fork 215
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
3.2.2 --configuration does not work #495
Comments
Same problem here, but the key is the right key in the first line off configuration file. when you change it to annother string it say´s the string is not exists. |
I've just come across this issue and couldn't find any example config. I've managed to get it working by removing
Assuming you have an entity manager call |
I suspect these 2 lines come into play: DoctrineMigrationsBundle/DependencyInjection/Configuration.php Lines 37 to 42 in 05490c7
Can you tell us which branch gets executed in your case? |
@greg0ire For me its the first path.
For reference this is the command I use to run the support migrations
|
Ah thanks for including the command you used, I didn't realize that was what was happening here. |
How does this work? I think the command is defined in another package: https://github.com/doctrine/migrations/blob/3.6.x/lib/Doctrine/Migrations/Tools/Console/Command/MigrateCommand.php But it does not have a DoctrineMigrationsBundle/Resources/config/services.xml Lines 113 to 119 in 05490c7
What version of |
Ah the flag is defined in a parent class: https://github.com/doctrine/migrations/blob/3.6.x/lib/Doctrine/Migrations/Tools/Console/Command/DoctrineCommand.php#L41-L46 Let's move this issue to the library then. |
Reading the docs, there is no mention of a So I think if there is an issue, it's a documentation issue. Moving back the issue to the Symfony bundle. |
I see 2 solutions:
|
Symfony creates a default config file for the migrations in doctrine_migrations:
migrations_paths:
# namespace is arbitrary but should be different from App\Migrations
# as migrations classes should NOT be autoloaded
'DoctrineMigrations': '%kernel.project_dir%/migrations'
enable_profiler: '%kernel.debug%' By specifying the I agree there should be more documentation around the --configuration parameter. Though there is the option to get Symfony to dump the default/example config with doctrine_migrations:
migrations_paths:
DoctrineMigrations: /var/www/html/migrations
enable_profiler: true
services: { }
factories: { }
storage:
table_storage:
table_name: null
version_column_name: null
version_column_length: null
executed_at_column_name: null
execution_time_column_name: null
migrations: { }
connection: null
em: null
all_or_nothing: false
check_database_platform: true
custom_template: null
organize_migrations: false
transactional: true That helps with when trying to know what to Google. |
Hi, I encountered a bug.
How to reproduce:
create a project with at least the default doctrine_migrations.yaml.
Try to load it using --configuration.
Also tried moving it to directories under src and using --em
The text was updated successfully, but these errors were encountered: