Как настроить новый Doctrine 3.0 - PullRequest
0 голосов
/ 12 июля 2020

У меня ошибка Doctrine 3.0:

In ArrayNode.php line 320:
                                                                                                                                                                                                 
  Unrecognized option "migrations_paths" under "doctrine_migrations". Available options are "all_or_nothing", "column_length", "column_name", "custom_template", "dir_name", "executed_at_colum  
  n_name", "name", "namespace", "organize_migrations", "table_name".

Я проверил обновление на GitHub, но все еще не работает

Мой настоящий doctrine_migrations.yaml *

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'

Спасибо за хелс

1 Ответ

0 голосов
/ 13 июля 2020

Если у вас есть doctrine миграции ^ 2.0 и обновлены до ^ 3.0, правильная конфигурация будет:


doctrine_migrations:
    migrations_paths:
        'DoctrineMigrations': '%kernel.project_dir%/src/Migrations'
    storage:
        table_storage:
            table_name: 'migration_versions'
            version_column_name: 'version'
            version_column_length: 255
            executed_at_column_name: 'executed_at'
            execution_time_column_name: 'execution_time'

Измените конфигурацию и затем запустите команду для синхронизации c метаданных:

 bin/console doctrine:migrations:sync-metadata-storage
...