Update 6.4.20.2 auf ~v6.5.0 per Composer in ddev

Hallo zusammen!

Ich versuche gerade in meiner DDEV Umgebung von 6.4 auf 6.5 zu updaten.

Ich halte mich an diese Anleitung: Shopware 6 - Update Guides - Shopware aktualisieren
Ich habe vor dem Update all meine Erweiterungen aus der composer.json entfernt und composer update gemacht.

bin/console system:update:prepare

Ich habe shopware/core wie in der Anleitung beschrieben auf 6.5 gesetz:

"require": {
    "php": "^7.4.3 || ^8.0",
    "composer-runtime-api": "^2.0",
    "cnc-theme/cnc-theme": "@dev",
    "shopware/administration": "~v6.4.0",
    "shopware/core": "~v6.5.0",
    "shopware/elasticsearch": "~v6.4.0",
    "shopware/recovery": "~v6.4.0",
    "shopware/storefront": "~v6.4.0"
},
composer update 

Da bekomme ich folgende Fehlermeldung:

ddev composer update
> [ ! -f vendor/autoload.php ] || $PHP_BINARY bin/console system:update:prepare
Run Update preparations
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - shopware/administration 6.4.0.0 requires shopware/core v6.4.0.0 -> found shopware/core[6.4.0.0] but it conflicts with your root composer.json require (~v6.5.0).
    - shopware/administration 6.4.1.0 requires shopware/core v6.4.1.0 -> found shopware/core[6.4.1.0] but it conflicts with your root composer.json require (~v6.5.0).
    - shopware/administration 6.4.1.1 requires shopware/core v6.4.1.1 -> found shopware/core[6.4.1.1] but it conflicts with your root composer.json require (~v6.5.0).
    - shopware/administration 6.4.1.2 requires shopware/core v6.4.1.2 -> found shopware/core[6.4.1.2] but it conflicts with your root composer.json require (~v6.5.0).
    - shopware/administration 6.4.2.0 requires shopware/core v6.4.2.0 -> found shopware/core[6.4.2.0] but it conflicts with your root composer.json require (~v6.5.0).
    - shopware/administration 6.4.2.1 requires shopware/core v6.4.2.1 -> found shopware/core[6.4.2.1] but it conflicts with your root composer.json require (~v6.5.0).
    - shopware/administration 6.4.3.0 requires shopware/core v6.4.3.0 -> found shopware/core[6.4.3.0] but it conflicts with your root composer.json require (~v6.5.0).
    - shopware/administration 6.4.3.1 requires shopware/core v6.4.3.1 -> found shopware/core[6.4.3.1] but it conflicts with your root composer.json require (~v6.5.0).
    - shopware/administration 6.4.4.0 requires shopware/core v6.4.4.0 -> found shopware/core[6.4.4.0] but it conflicts with your root composer.json require (~v6.5.0).
    - shopware/administration 6.4.4.1 requires shopware/core v6.4.4.1 -> found shopware/core[6.4.4.1] but it conflicts with your root composer.json require (~v6.5.0).
    - shopware/administration 6.4.5.0 requires shopware/core v6.4.5.0 -> found shopware/core[6.4.5.0] but it conflicts with your root composer.json require (~v6.5.0).
    - shopware/administration 6.4.5.1 requires shopware/core v6.4.5.1 -> found shopware/core[6.4.5.1] but it conflicts with your root composer.json require (~v6.5.0).
    - shopware/administration 6.4.6.0 requires shopware/core v6.4.6.0 -> found shopware/core[6.4.6.0] but it conflicts with your root composer.json require (~v6.5.0).
    - shopware/administration 6.4.6.1 requires shopware/core v6.4.6.1 -> found shopware/core[6.4.6.1] but it conflicts with your root composer.json require (~v6.5.0).
    - shopware/administration 6.4.7.0 requires shopware/core v6.4.7.0 -> found shopware/core[6.4.7.0] but it conflicts with your root composer.json require (~v6.5.0).
    - shopware/administration 6.4.8.0 requires shopware/core v6.4.8.0 -> found shopware/core[6.4.8.0] but it conflicts with your root composer.json require (~v6.5.0).
    - shopware/administration 6.4.8.1 requires shopware/core 6.4.8.1 -> found shopware/core[6.4.8.1] but it conflicts with your root composer.json require (~v6.5.0).
    - shopware/administration 6.4.8.2 requires shopware/core v6.4.8.2 -> found shopware/core[6.4.8.2] but it conflicts with your root composer.json require (~v6.5.0).
    - shopware/administration 6.4.9.0 requires shopware/core v6.4.9.0 -> found shopware/core[6.4.9.0] but it conflicts with your root composer.json require (~v6.5.0).
    - shopware/administration 6.4.10.0 requires shopware/core v6.4.10.0 -> found shopware/core[6.4.10.0] but it conflicts with your root composer.json require (~v6.5.0).
    - shopware/administration 6.4.10.1 requires shopware/core v6.4.10.1 -> found shopware/core[6.4.10.1] but it conflicts with your root composer.json require (~v6.5.0).
    - shopware/administration 6.4.11.0 requires shopware/core v6.4.11.0 -> found shopware/core[6.4.11.0] but it conflicts with your root composer.json require (~v6.5.0).
    - shopware/administration 6.4.11.1 requires shopware/core v6.4.11.1 -> found shopware/core[6.4.11.1] but it conflicts with your root composer.json require (~v6.5.0).
    - shopware/administration 6.4.12.0 requires shopware/core v6.4.12.0 -> found shopware/core[6.4.12.0] but it conflicts with your root composer.json require (~v6.5.0).
    - shopware/administration 6.4.13.0 requires shopware/core v6.4.13.0 -> found shopware/core[6.4.13.0] but it conflicts with your root composer.json require (~v6.5.0).
    - shopware/administration 6.4.14.0 requires shopware/core v6.4.14.0 -> found shopware/core[6.4.14.0] but it conflicts with your root composer.json require (~v6.5.0).
    - shopware/administration 6.4.15.0 requires shopware/core v6.4.15.0 -> found shopware/core[6.4.15.0] but it conflicts with your root composer.json require (~v6.5.0).
    - shopware/administration 6.4.15.1 requires shopware/core v6.4.15.1 -> found shopware/core[6.4.15.1] but it conflicts with your root composer.json require (~v6.5.0).
    - shopware/administration 6.4.15.2 requires shopware/core v6.4.15.2 -> found shopware/core[6.4.15.2] but it conflicts with your root composer.json require (~v6.5.0).
    - shopware/administration 6.4.16.0 requires shopware/core v6.4.16.0 -> found shopware/core[6.4.16.0] but it conflicts with your root composer.json require (~v6.5.0).
    - shopware/administration 6.4.16.1 requires shopware/core v6.4.16.1 -> found shopware/core[6.4.16.1] but it conflicts with your root composer.json require (~v6.5.0).
    - shopware/administration 6.4.17.0 requires shopware/core v6.4.17.0 -> found shopware/core[6.4.17.0] but it conflicts with your root composer.json require (~v6.5.0).
    - shopware/administration 6.4.17.1 requires shopware/core v6.4.17.1 -> found shopware/core[6.4.17.1] but it conflicts with your root composer.json require (~v6.5.0).
    - shopware/administration 6.4.17.2 requires shopware/core v6.4.17.2 -> found shopware/core[6.4.17.2] but it conflicts with your root composer.json require (~v6.5.0).
    - shopware/administration 6.4.18.0 requires shopware/core v6.4.18.0 -> found shopware/core[6.4.18.0] but it conflicts with your root composer.json require (~v6.5.0).
    - shopware/administration 6.4.18.1 requires shopware/core v6.4.18.1 -> found shopware/core[6.4.18.1] but it conflicts with your root composer.json require (~v6.5.0).
    - shopware/administration 6.4.19.0 requires shopware/core v6.4.19.0 -> found shopware/core[6.4.19.0] but it conflicts with your root composer.json require (~v6.5.0).
    - shopware/administration 6.4.20.0 requires shopware/core v6.4.20.0 -> found shopware/core[6.4.20.0] but it conflicts with your root composer.json require (~v6.5.0).
    - shopware/administration 6.4.20.1 requires shopware/core v6.4.20.1 -> found shopware/core[6.4.20.1] but it conflicts with your root composer.json require (~v6.5.0).
    - shopware/administration 6.4.20.2 requires shopware/core v6.4.20.2 -> found shopware/core[6.4.20.2] but it conflicts with your root composer.json require (~v6.5.0).
    - Root composer.json requires shopware/administration ~v6.4.0 -> satisfiable by shopware/administration[6.4.0.0, ..., 6.4.20.2].

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
Composer [update] failed, composer command failed: exit status 2. stderr=

Ich folge dem Fehler und setze wider der Anleitung
"shopware/administration": "~v6.5.0",

Da bekomme ich die nächste Fehlermeldung bzgl. einer Abhängigkeit… das Spiel geht dann recht lange weiter. Immer wieder will er eine neue Abhängigkeit. Mein Bauchgefühl sagt mir, dass das nicht so sein sollte.

composer update -W bringt hier auch nichts.

Hat jemand einen Rat, wie ich am besten vorgehe? Vielen Dank im Voraus für eure Hilfe!

Viele Grüße,

Tobias

Wir haben exakt das gleiche Problem. Geht man alle Meldungen durch, fügt alles so ein wie in den Fehlermeldungen verlangt, bleibt am Ende noch folgendes. Und hier verzweifeln wir:

Wir haben mehrere Versuche gestartet, auch mit Shopware Version 6.5.0.0
Update über den Browser, über die Console, alles kommt auf den selben Fehler am Ende.

Vielleicht postet ja jemand eine Lösung.

Beste Grüße
Simon

Moin. Ich habe zwar bisher nur über den Browser aktualisiert, kenne das aber von anderen Systemen.
Wenn man den Core auf 6.5 setzt, muss der Admin und alle Abhängigkeiten doch auch auf 6.5 gesetzt werden.

ja, soweit die Theorie :slight_smile: das ist auch der Weg, den Simon beschrieben hat - man kommt aber irgendwann nicht mehr weiter.

Poste mal die komplette composer.json deines Shopware 6 Shops.

Von der composer.json das package Shopware/Recovery entfernen, da dieser ab SW 6.5 nicht mehr als stable zur Verfügung stehr

So sieht der Require Teil bei mir aus und so läuft die Aktualisierung auch durch.

"require": {
        "composer-runtime-api": "^2.0",
        "shopware/administration": "6.5.7.2",
        "shopware/core": "6.5.7.2",
        "shopware/elasticsearch": "6.5.7.2",
        "shopware/storefront": "6.5.7.2",
        "symfony/flex": "~2",
        "symfony/runtime": "^5.0|^6.0"
    },

super - vielen Dank fürs teilen! Ich habe mal mein require exakt so abgeändert, und es kommt folgende Fehlermeldung:

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires shopware/core 6.5.7.2 -> satisfiable by shopware/core[v6.5.7.2].
    - fakerphp/faker v1.14.1 requires symfony/deprecation-contracts ^2.2 -> satisfiable by symfony/deprecation-contracts[v2.2.0, ..., v2.5.2].
    - You can only install one version of a package, so only one of these can be installed: symfony/deprecation-contracts[v2.1.0, ..., v2.5.2, v3.0.0, ..., v3.4.0].
    - symfony/error-handler[v6.3.0, ..., v6.3.5] conflict with symfony/deprecation-contracts <2.5.
    - shopware/core v6.5.7.2 requires symfony/deprecation-contracts ~3.1.0 -> satisfiable by symfony/deprecation-contracts[v3.1.0, v3.1.1].
    - shopware/core v6.5.7.2 requires symfony/error-handler ~6.3.0 -> satisfiable by symfony/error-handler[v6.3.0, v6.3.2, v6.3.5].
    - Root composer.json requires fakerphp/faker ~1.14.1 -> satisfiable by fakerphp/faker[v1.14.1].

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
Composer [update] failed, composer command failed: exit status 2. stderr=

Es startet eine andere unendliche Odyssee an manuellen Anpassungen der composer.json…

Ich bin nun einen halben Schritt weiter. Ich habe mich zu dieser json durchgeboxt:

{
    "name": "shopware/production",
    "type": "project",
    "license": "MIT",
    "config": {
        "optimize-autoloader": true,
        "platform": {
            "php": "8.1.23"
        },
        "sort-packages": true,
        "allow-plugins": {
            "composer/package-versions-deprecated": true,
            "symfony/runtime": true
        }
    },
    "prefer-stable": true,
    "minimum-stability": "stable",
    "scripts": {
        "pre-install-cmd": [
            "[ ! -f vendor/autoload.php ] || $PHP_BINARY bin/console system:update:prepare"
        ],
        "pre-update-cmd": [
            "[ ! -f vendor/autoload.php ] || $PHP_BINARY bin/console system:update:prepare"
        ],
        "post-install-cmd": [
            "@composer install --working-dir vendor/shopware/recovery --no-interaction --no-scripts",
            "@composer install --working-dir=vendor/shopware/recovery/Common --no-interaction --optimize-autoloader --no-suggest",
            "[ ! -f vendor/autoload.php ] || $PHP_BINARY bin/console system:update:finish"
        ],
        "post-update-cmd": [
            "@composer install --working-dir vendor/shopware/recovery --no-interaction --no-scripts",
            "@composer install --working-dir=vendor/shopware/recovery/Common --no-interaction --optimize-autoloader --no-suggest",
            "[ ! -f vendor/autoload.php ] || $PHP_BINARY bin/console system:update:finish"
        ]
    },
    "autoload": {
        "psr-4": {
            "Shopware\\Production\\": "src/"
        }
    },
    "repositories": {
        "shopware-packages": {
            "type": "composer",
            "url": "https://packages.shopware.com"
        },
        "0": {
            "type": "path",
            "url": "custom/static-plugins/*",
            "options": {
                "symlink": true
            }
        }
    },
    "require": {
        "composer-runtime-api": "^2.0",
        "cnc-theme/cnc-theme": "@dev",
        "shopware/administration": "~v6.5.0",
        "shopware/core": "~v6.5.0",
        "shopware/elasticsearch": "~v6.5.0",
        "shopware/storefront": "~v6.5.0"
    },
    "require-dev": {
        "ext-openssl": "*",
        "ext-tokenizer": "*",
        "ext-xmlwriter": "*",
        "defuse/php-encryption": "~2.2.1 || ^2.3.0",
        "dms/phpunit-arraysubset-asserts": "^0.2.1",
        "fakerphp/faker": "^v1.14.1",
        "johnkary/phpunit-speedtrap": "~3.3.0",
        "league/flysystem-memory": "~3.10",
        "maltyxx/images-generator": "~1.0.0",
        "mbezhanov/faker-provider-collection": "~2.0.1",
        "nikic/php-parser": "~4.13.2",
        "opis/json-schema": "~1.0.19",
        "phpunit/php-code-coverage": "~9.2.14",
        "phpunit/phpunit": "~9.5.17",
        "smalot/pdfparser": "~0.14.0",
        "symfony/browser-kit": "~4.4 || ~5.2.3 || ~5.3.0 || ~5.4.0",
        "symfony/dependency-injection": "~4.4 || ~5.2.3 || ~5.3.0 || ~5.4.0 || ~6.2.0 || ~6.3.0",
        "symfony/css-selector": "^5.3",
        "symfony/dom-crawler": "~4.4 || ~5.2.3 || ~5.3.0 || ~5.4.0",
        "symfony/phpunit-bridge": "~4.4 || ~5.2.3 || ~5.3.0 || ~5.4.0",
        "symfony/stopwatch": "~4.4 || ~5.2.3 || ~5.3.0 || ~5.4.0 || ~6.2.0 || ~6.3.0",
        "symfony/var-dumper": "~4.4 || ~5.2.3 || ~5.3.0 || ~5.4.0",
        "symfony/web-profiler-bundle": "~4.4 || ~5.2.3 || ~5.3.0 || ~5.4.0",
        "league/oauth2-server": "~8.5 || ~8.3.6"
    }
}

Nun bekomme ich folgende Fehlermeldung - die wahrscheinlich logisch ist, wenn man sich mit dem „post-install-cmd“-Teil auskennt:

In Application.php line 432:
                                                                                 
  Invalid working directory specified, vendor/shopware/recovery does not exist.  
                                                                                 

Script @composer install --working-dir vendor/shopware/recovery --no-interaction --no-scripts handling the post-update-cmd event returned with error code 1
Composer [update] failed, composer command failed: exit status 1. stderr=

Kann mir da bitte jemand weiterhelfen, wie der „scripts“-Teil aussehen muss, damit diese Fehlermeldung nicht mehr kommt? Vielen Dank!

Ich denke ein Blick auf Symfony Flex | Shopware Documentation dürfte deine Probleme lösen.

Also im Web-Updater wird ausdrücklich erst auf Shopware 6.4.20.2 aktualisiert. Erst mit dieser finalen 6.4er Version kann man auf 6.5.* aktualisieren.

danke dir für deine Antwort! Ja, 6.4.20.2 habe ich aktuell (s. Überschrift :slight_smile: )

vielen Dank für deine Hilfe! Ich habe die Änderungen, die dort beschrieben sind, umgesetzt:

{
    "name": "shopware/production",
    "type": "project",
    "license": "MIT",
    "config": {
        "optimize-autoloader": true,
        "platform": {
            "php": "8.1.23"
        },
        "sort-packages": true,
        "allow-plugins": {
            "composer/package-versions-deprecated": true,
            "symfony/runtime": true
        }
    },
    "prefer-stable": true,
    "minimum-stability": "stable",
    "scripts": {
        "pre-install-cmd": [
            "[ ! -f vendor/autoload.php ] || $PHP_BINARY bin/console system:update:prepare"
        ],
        "pre-update-cmd": [
            "[ ! -f vendor/autoload.php ] || $PHP_BINARY bin/console system:update:prepare"
        ],
        "post-install-cmd": [
            "@auto-scripts",
            "[ ! -f vendor/autoload.php ] || $PHP_BINARY bin/console system:update:finish"
        ],
        "post-update-cmd": [
            "@auto-scripts",
            "[ ! -f vendor/autoload.php ] || $PHP_BINARY bin/console system:update:finish"
        ]
    },
    "autoload": {
        "psr-4": {
            "Shopware\\Production\\": "src/"
        }
    },
    "repositories": {
        "shopware-packages": {
            "type": "composer",
            "url": "https://packages.shopware.com"
        },
        "0": {
            "type": "path",
            "url": "custom/static-plugins/*",
            "options": {
                "symlink": true
            }
        }
    },
    "require": {
        "composer-runtime-api": "^2.0",
        "cnc-theme/cnc-theme": "@dev",
        "shopware/administration": "~v6.5.0",
        "shopware/core": "~v6.5.0",
        "shopware/elasticsearch": "~v6.5.0",
        "shopware/storefront": "~v6.5.0"
    },
    "require-dev": {
        "ext-openssl": "*",
        "ext-tokenizer": "*",
        "ext-xmlwriter": "*",
        "defuse/php-encryption": "~2.2.1 || ^2.3.0",
        "dms/phpunit-arraysubset-asserts": "^0.2.1",
        "fakerphp/faker": "^v1.14.1",
        "johnkary/phpunit-speedtrap": "~3.3.0",
        "league/flysystem-memory": "~3.10",
        "maltyxx/images-generator": "~1.0.0",
        "mbezhanov/faker-provider-collection": "~2.0.1",
        "nikic/php-parser": "~4.13.2",
        "opis/json-schema": "~1.0.19",
        "phpunit/php-code-coverage": "~9.2.14",
        "phpunit/phpunit": "~9.5.17",
        "smalot/pdfparser": "~0.14.0",
        "symfony/browser-kit": "~4.4 || ~5.2.3 || ~5.3.0 || ~5.4.0",
        "symfony/dependency-injection": "~4.4 || ~5.2.3 || ~5.3.0 || ~5.4.0 || ~6.2.0 || ~6.3.0",
        "symfony/css-selector": "^5.3",
        "symfony/dom-crawler": "~4.4 || ~5.2.3 || ~5.3.0 || ~5.4.0",
        "symfony/phpunit-bridge": "~4.4 || ~5.2.3 || ~5.3.0 || ~5.4.0",
        "symfony/stopwatch": "~4.4 || ~5.2.3 || ~5.3.0 || ~5.4.0 || ~6.2.0 || ~6.3.0",
        "symfony/var-dumper": "~4.4 || ~5.2.3 || ~5.3.0 || ~5.4.0",
        "symfony/web-profiler-bundle": "~4.4 || ~5.2.3 || ~5.3.0 || ~5.4.0",
        "league/oauth2-server": "~8.5 || ~8.3.6"
    },
    "extra": {
        "symfony": {
            "allow-contrib": true,
            "endpoint": [
                "https://raw.githubusercontent.com/shopware/recipes/flex/main/index.json",
                "flex://defaults"
            ]
        }
    }
}

und bekomme diese Fehlermeldung nun:

> [ ! -f vendor/autoload.php ] || $PHP_BINARY bin/console system:update:prepare
PHP Fatal error:  Uncaught Error: Class "Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle" not found in /var/www/html/vendor/shopware/core/Kernel.php:97
Stack trace:
#0 /var/www/html/vendor/symfony/http-kernel/Kernel.php(331): Shopware\Core\Kernel->registerBundles()
#1 /var/www/html/vendor/shopware/core/Kernel.php(163): Symfony\Component\HttpKernel\Kernel->initializeBundles()
#2 /var/www/html/bin/console(74): Shopware\Core\Kernel->boot()
#3 {main}
  thrown in /var/www/html/vendor/shopware/core/Kernel.php on line 97
  thrown in /var/www/html/vendor/shopware/core/Kernel.php on line 97

Fatal error: Uncaught Error: Class "Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle" not found in /var/www/html/vendor/shopware/core/Kernel.php:97
Stack trace:
#0 /var/www/html/vendor/symfony/http-kernel/Kernel.php(331): Shopware\Core\Kernel->registerBundles()
#1 /var/www/html/vendor/shopware/core/Kernel.php(163): Symfony\Component\HttpKernel\Kernel->initializeBundles()
#2 /var/www/html/bin/console(74): Shopware\Core\Kernel->boot()
#3 {main}
  thrown in /var/www/html/vendor/shopware/core/Kernel.php on line 97
Script [ ! -f vendor/autoload.php ] || $PHP_BINARY bin/console system:update:prepare handling the pre-update-cmd event returned with error code 255
Composer [update] failed, composer command failed: exit status 255. stderr=

Ich bin echt verwirrt, dass man für ein normales Update wirklich soviel händische Arbeit investieren muss. Daher vermute ich, dass irgendwo noch ein grundlegendes Problem bei dem Updateprozedere sein müsste… :frowning:

Ein paar Sachen sehen noch nicht wie auf der Flex Doku aus:

„scripts“: {
„auto-scripts“: ,
„post-install-cmd“: [
@auto-scripts
],
„post-update-cmd“: [
@auto-scripts
]
}

sowie die Platform