Skip to content
Menu
HE'S BLOG
  • Home
  • One Page
  • Home page
  • Links
  • Mac
  • Windows
  • Program
  • AI
HE'S BLOG
2020年7月3日

一个Symfony项目更新报错

你个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

近期文章

  • Dify1.3.1安装
  • Gopro 驱动下载
  • Popular models download website
  • Stable diffusion enable remote access
  • Ollama remote access

近期评论

    归档

    • 2025 年 5 月
    • 2025 年 3 月
    • 2025 年 2 月
    • 2024 年 3 月
    • 2023 年 10 月
    • 2023 年 5 月
    • 2023 年 4 月
    • 2022 年 11 月
    • 2022 年 9 月
    • 2022 年 5 月
    • 2022 年 4 月
    • 2022 年 3 月
    • 2022 年 2 月
    • 2022 年 1 月
    • 2021 年 10 月
    • 2021 年 9 月
    • 2021 年 5 月
    • 2020 年 7 月
    • 2020 年 6 月
    • 2020 年 5 月
    • 2020 年 4 月
    • 2020 年 3 月
    • 2019 年 11 月
    • 2019 年 10 月
    • 2018 年 9 月
    • 2018 年 6 月
    • 2018 年 5 月
    • 2018 年 2 月
    • 2017 年 8 月
    • 2016 年 4 月

    分类

    • AI
    • Android
    • Angular
    • Apple Hardware
    • C++
    • Docker
    • Doctine
    • ELK
    • English
    • Hadoop
    • Hbase
    • IDE&Tools
    • Ionic2
    • Javascript
    • jQuery
    • Kubernetes
    • Mac
    • PHP
    • Program
    • Scala
    • Shell
    • SQL
    • Symfony
    • Web
    • Wordpress
    • 一行命令

    其他操作

    • 登录
    • 条目 feed
    • 评论 feed
    • WordPress.org
    ©2025 HE'S BLOG | Powered by WordPress and Superb Themes!
    Menu
    HE'S BLOG
    • Home
    • One Page
    • Home page
    • Links
    • Mac
    • Windows
    • Program
    • AI