Script cache:clear returned with error code 1
Asked Answered
I

1

6

i've tried to update Symfony 4.3 runing the command "composer update". 107 packages were updated . then in the end of the script an error appeared when runing the command "cache:clear"

Executing 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

Izanagi answered 10/8, 2020 at 9:48 Comment(3)
Have you tried using a search engine for that problem? To me, this looks like you've updated doctrine/doctrine-migrations-bundle to v3, and ithe update notes provide clear instructions at github.com/doctrine/DoctrineMigrationsBundle/blob/master/… about how to handle thisConformation
in my case i did run "composer update" to keep my application up to date, it was not in my intentions to updgrade anything, but composer did update/upgrade many vendors ,and that error appeared, of course i did some researches to find the problem and i posted the solution bellow. thanks for the link you provided it's helpfull to these who wants to upgrade the doctrine-migrations bundleIzanagi
If you don't want to upgrade anything accidentially when running composer update, you should consider to use tighter version constraintsConformation
I
19

i did some reserches and i foud that i have to update the DoctrineMigrations config file config/packages/doctrine_migrations.yaml :

from

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

to

doctrine_migrations:
  migrations_paths:
    "App\\Migrations": "src/Migrations"
Izanagi answered 10/8, 2020 at 9:48 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.