2

When trying to do a "composer upgrade", it fails in "@auto-scripts" when reaching doctrine/doctrine-bundle.

The error is:

Executing script cache:clear [KO]
 [KO]
Script cache:clear returned with error code 1
!!  
!!  In ArrayNode.php line 304:
!!                                                                                 
!!    Unrecognized option "use_savepoints" under "doctrine.dbal.connections.defau  
!!    lt". Available options are "MultipleActiveResultSets", "application_name",   
!!    "auto_commit", "charset", "connectstring", "dbname", "dbname_suffix", "defa  
!!    ult_dbname", "default_table_options", "driver", "driver_class", "host", "id  
!!    le_connection_ttl", "instancename", "keep_replica", "logging", "mapping_typ  
!!    es", "memory", "options", "password", "path", "persistent", "pooled", "port  
!!    ", "profiling", "profiling_collect_backtrace", "profiling_collect_schema_er  
!!    rors", "protocol", "replicas", "result_cache", "schema_filter", "schema_man  
!!    ager_factory", "server", "server_version", "service", "servicename", "sessi  
!!    onMode", "sslcert", "sslcrl", "sslkey", "sslmode", "sslrootcert", "unix_soc  
!!    ket", "url", "user", "wrapper_class".                                        
!!                                                                                 
!!  
!!  
Script @auto-scripts was called via post-update-cmd

My composer.json:

{
    "type": "project",
    "license": "proprietary",
    "minimum-stability": "stable",

    "require": {
        "symfony/framework-bundle": "^7.3",
        "symfony/console": "^7.3",
        "symfony/flex": "^2.8",
        "symfony/runtime": "^7.3",
        "symfony/http-client": "^7.3",
        "symfony/twig-bundle": "^7.3",
        "symfony/dotenv": "^7.3",
        "symfony/uid": "^7.3",
        "symfony/yaml": "^7.3",
        "doctrine/orm": "^3.5",
        "doctrine/doctrine-bundle": "^3.0",
        "doctrine/doctrine-migrations-bundle": "^3.5",
        "amphp/file": "^3.2"
    },
    "config": {
        "allow-plugins": {
            "symfony/flex": true,
            "symfony/runtime": true
        }
    },
    "scripts": {
        "auto-scripts": {
            "cache:clear": "symfony-cmd",
            "assets:install %PUBLIC_DIR%": "symfony-cmd"
        },
        "post-install-cmd": [
            "@auto-scripts"
        ],
        "post-update-cmd": [
            "@auto-scripts"
        ]
    },
    "autoload": {
        "psr-4": {
            "App\\": "src/"
        }
    }
}

This is reproducible.

  1. Create a new, empty directory
  2. Add my composer.json
  3. Run "composer install"

More context, as requested by stackoverflow to let me post: I run a website using php, symfony and doctrine, managed by composer. Now I tried upgrading from symfony 7.2 to 7.3, which didn't work. For testing purposes, I then created a new directory and let composer handle composer.json (almost) completely, by only running "composer require" and "composer require --dev". The only addition I made is the post-update-cmd and post-install-cmd, so I see the problem directly and don't have to set up a webserver serving the new directory.

1 Answer 1

2

The problem with missing options came from config/packages/doctrine.yaml

There, the standard config sets options that were removed in doctrine-orm v3, namely:

doctrine.dbal.use_savepoints
doctrine.orm.auto_generate_proxy_classes
doctrine.orm.enable_lazy_ghost_objects
doctrine.orm.report_fields_where_declared

Commenting out / removing those options resolved the issue.
Hopefully the package supplying those config options fixes this. In the meantime, manually editing the file seems to work.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.