微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

Symfony 4 错误,其中缓存:清除或作曲家更新

如何解决Symfony 4 错误,其中缓存:清除或作曲家更新

当我运行 composer updatebin/console cache:clear 时,出现了以下问题:

执行脚本缓存:清除[KO]

脚本缓存:清除返回错误代码 1

在 ArrayNode.PHP 第 331 行:

无法识别的选项“dir_name,namespace”下 “doctrine_migrations”。艾娃!!无效的选项是 "all_or_nothing","check_database_platform","连接!!","custom_template","em","factories","migrations","migrations_paths",!! "organize_migrations","服务",“存储”。

脚本@auto-scripts 是通过 post-update-cmd 调用

enter image description here

解决方法

我通过更改解决了这个问题: 我编辑了学说迁移.yaml:

之前:

doctrine_migrations:
    dir_name: '%kernel.project_dir%/src/Migrations'
    # namespace is arbitrary but should be different from App\Migrations
    # as migrations classes should NOT be autoloaded
    namespace: DoctrineMigrations

之后:

doctrine_migrations:
    migrations_paths:
        'DoctrineMigrations': '%kernel.project_dir%/src/Migrations'

参考: https://github.com/doctrine/DoctrineMigrationsBundle/blob/3.1.x/UPGRADE.md

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。