diff --git a/.github/workflows/php.yaml b/.github/workflows/php.yaml index b03e4f0e2..de63ad92e 100644 --- a/.github/workflows/php.yaml +++ b/.github/workflows/php.yaml @@ -25,3 +25,23 @@ jobs: uses: ./.github/workflows/action-phpstan.yml with: extension_name: ${{ github.event.repository.name }} + + extension_verifier: + name: Extension Verifier (lowest) + runs-on: ubuntu-latest + steps: + - name: Checkout SwagMigrationAssistant + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + + - name: Remove PHPStan config + run: rm phpstan.neon.dist + + - name: Allow composer to resolve advisory-affected releases + run: composer config policy.advisories.block false + + - name: Run verifier + uses: shopware/github-actions/extension-verifier@main + with: + action: check + check-against: lowest + exclude: stylelint diff --git a/.shopware-extension.yml b/.shopware-extension.yml new file mode 100644 index 000000000..3627338f5 --- /dev/null +++ b/.shopware-extension.yml @@ -0,0 +1,8 @@ +# yaml-language-server: $schema=https://shopware.github.io/shopware-cli/shopware-extension-schema.json +compatibility_date: '2026-08-14' + +validation: + ignore: + # The verifier's PHPStan cannot see functions defined in vendor PSR-4 files, these resolve at runtime. + - message: 'Function service not found' + - message: 'Function tagged_iterator not found' diff --git a/CHANGELOG.md b/CHANGELOG.md index 6badf04be..974e1560f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ - #18902 - Fixed a bug in media migration whereby failed downloads were not marked as definitively failed once the retry attempts had been exhausted. As a result, processing could not be completed correctly. - #17832 - Fixed attribute migration so custom fields with an empty label no longer abort the run. The reader now keeps the `column_name` in the attribute configuration. - #12748 - Fixed order migration so `product.sales` is recalculated from persisted order line items after migrated orders are written. Cancelled orders are excluded from the sales calculation. +- Fixed attribute migration on installations that resolve Doctrine DBAL 4.2, where reading attributes through the Shopware local gateway aborted the run. # 18.0.0 diff --git a/CHANGELOG_de-DE.md b/CHANGELOG_de-DE.md index 7d9efcb87..57e93eb9c 100644 --- a/CHANGELOG_de-DE.md +++ b/CHANGELOG_de-DE.md @@ -3,6 +3,7 @@ - #18902 - Fehler bei der Medienmigration behoben, durch den fehlgeschlagene Downloads nach Ablauf der Wiederholungsversuche nicht als endgültig fehlgeschlagen markiert wurden. Dadurch konnte die Verarbeitung nicht korrekt abgeschlossen werden. - #17832 - Die Attribut-Migration wurde korrigiert, sodass Zusatzfelder mit leerem Label die Migration nicht mehr abbrechen. Der Reader behält nun den `column_name` in der Attributkonfiguration. - #12748 - Die Migration von Bestellungen wurde korrigiert, sodass `product.sales` nach dem Schreiben migrierter Bestellungen anhand der persistierten Bestellpositionen neu berechnet wird. Stornierte Bestellungen werden dabei nicht berücksichtigt. +- Die Attribut-Migration wurde für Installationen korrigiert, die Doctrine DBAL 4.2 auflösen. Dort brach das Lesen der Attribute über das lokale Shopware-Gateway die Migration ab. # 18.0.0 diff --git a/composer.json b/composer.json index b64699e06..11cce2021 100644 --- a/composer.json +++ b/composer.json @@ -12,6 +12,9 @@ "require": { "shopware/core": "~6.7" }, + "suggest": { + "shopware/storefront": "Required for migrating themes and their sales channel assignments" + }, "extra": { "shopware-plugin-class": "SwagMigrationAssistant\\SwagMigrationAssistant", "plugin-icon": "src/Resources/config/plugin.png", diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 47c7c4755..5455f057a 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -48,6 +48,9 @@ parameters: - message: '#Call to deprecated method listTableForeignKeys\(\) of class Doctrine\\DBAL\\Schema\\AbstractSchemaManager#' paths: - src/Profile/Shopware/Gateway/Local/Reader/AttributeReader.php + - message: '#Call to deprecated method getLocalColumns\(\) of class Doctrine\\DBAL\\Schema\\ForeignKeyConstraint#' + paths: + - src/Profile/Shopware/Gateway/Local/Reader/AttributeReader.php # TODO: The MainOrContainer type cannot fully express its state after nested array mutations - identifier: parameterByRef.type diff --git a/src/Profile/Shopware/Gateway/Local/Reader/AttributeReader.php b/src/Profile/Shopware/Gateway/Local/Reader/AttributeReader.php index f17bbf89b..77309a7c1 100644 --- a/src/Profile/Shopware/Gateway/Local/Reader/AttributeReader.php +++ b/src/Profile/Shopware/Gateway/Local/Reader/AttributeReader.php @@ -9,7 +9,6 @@ use Doctrine\DBAL\Schema\Column; use Doctrine\DBAL\Schema\ForeignKeyConstraint; -use Doctrine\DBAL\Schema\Name\UnqualifiedName; use Doctrine\DBAL\Types\AsciiStringType; use Doctrine\DBAL\Types\BigIntType; use Doctrine\DBAL\Types\BinaryType; @@ -192,7 +191,8 @@ private function cleanupColumns(array $columns, array $foreignKeys): array $fks = []; foreach ($foreignKeys as $foreignKey) { - $fks[] = array_map(static fn (UnqualifiedName $name) => $name->toString(), $foreignKey->getReferencingColumnNames()); + // getLocalColumns() is deprecated, but getReferencingColumnNames() needs DBAL 4.3+ (Shopware 6.7.0/6.7.1 can lock DBAL 4.2) + $fks[] = $foreignKey->getLocalColumns(); } if ($fks !== []) {