你个2018年的项目要进行升级。由Symfony4.1升级到4.4, 升级过程解决了内存报错后,又出现以下错误.
Reading ./composer.lock
ocramius/package-versions: Generating version class...
ocramius/package-versions: ...done generating version class
> post-update-cmd: @auto-scripts
Executing script cache:clear
Executed script cache:clear [KO]
[KO]
Script cache:clear returned with error code 1
!!
!! In ArrayNode.php line 327:
!!
!! Unrecognized options "dir_name, namespace" under "doctrine_migrations". Ava
!! ilable options are "all_or_nothing", "check_database_platform", "connection
!! ", "custom_template", "em", "factories", "migrations", "migrations_paths",
!! "organize_migrations", "services", "storage".
!!
!!
!!
Script @auto-scripts was called via post-update-cmd
unable to run /usr/local/bin/composer update -vvv: exit status 1
Google出是DoctrineMigrationsBundle由2.x升级到3.x引起的,需要修改/config/doctrine_migrations.yml
修改之前:
doctrine_migrations:
dir_name: '%kernel.project_dir%/src/Migrations'
namespace: DoctrineMigrations
修改之后:
doctrine_migrations:
migrations_paths:
'DoctrineMigrations': '%kernel.project_dir%/src/Migrations'
修改完成后, 运行
symfony composer update
更新顺利完成
参考:
https://github.com/doctrine/DoctrineMigrationsBundle/issues/338
https://github.com/doctrine/DoctrineMigrationsBundle/blob/master/UPGRADE.md