fix(release): repack zip root-level for the Composer registry #14

Merged
haylan merged 10 commits from fix/release-registry-zip into main 2026-10-03 23:21:08 +00:00
Owner

User description

Why

The release of v0.1.0 (merged PR 13) failed at the Composer registry step: Gitea answered 400 composer.json file is missing. The shopware-cli zip wraps everything in a top-level folder; Gitea needs composer.json at the zip root. (The release and tag v0.1.0 and its asset were created; only the registry upload and package link are missing for that version.)

Changes

  • release.yml: repack the same prebuilt zip root-level for the Composer registry upload (the GitHub-style Release asset stays the shopware-cli zip). Steps are now idempotent (existing release/asset reused, registry 409 = published) and the "tag exists -> skip" guard is removed, so a failed run can be re-run to completion.
  • Docs: CLAUDE.md (PHP ^8.2, real admin module, CI/release section) and the compliance spec refreshed after PR 13.
  • Tests: unit tests asserting CreateDumpHandler and DumpService::delete log to the injected PSR logger (not yet run; CI is the first run).
  • Version 0.1.1 + changelog (required by the PR check).

Not verified

  • The repack step has only been checked by reading; the first real run is this PR's merge.
  • New tests have never been executed (mock signatures copied from src/).

🤖 Generated with Claude Code


PR Type

Bug fix, Tests, Documentation


Description

  • Repack release zip root-level for registry

  • Make release workflow steps idempotent

  • Add PSR logger unit tests

  • Bump version and refresh docs


Diagram Walkthrough

flowchart LR
  A["Release workflow"] -- "repack root-level" --> B["Composer registry zip"]
  A -- "idempotent release" --> C["Gitea release"]
  D["Logger tests"] -- "verify" --> E["Dump services"]
  F["Docs and version"] -- "refresh" --> G["Release docs"]

File Walkthrough

Relevant files
Tests
3 files
CreateDumpHandlerTest.php
Add CreateDumpHandler PSR logging tests                                   
+46/-0   
DumpServiceLoggingTest.php
Add DumpService delete logging tests                                         
+66/-0   
RecordingLogger.php
Add PSR logger test double                                                             
+16/-0   
Bug fix
1 files
release.yml
Repack zip and make release idempotent                                     
+47/-26 
Documentation
3 files
CHANGELOG.md
Add version 0.1.1 release notes                                                   
+7/-0     
CLAUDE.md
Document admin module and CI release                                         
+28/-2   
shopware-guideline-compliance.md
Update compliance spec after pipeline run                               
+16/-12 
Configuration changes
1 files
composer.json
Bump plugin version to 0.1.1                                                         
+1/-1     

<!-- pr-agent-generated --> ### **User description** ## Why The release of v0.1.0 (merged PR 13) failed at the Composer registry step: Gitea answered `400 composer.json file is missing`. The `shopware-cli` zip wraps everything in a top-level folder; Gitea needs `composer.json` at the zip root. (The release and tag `v0.1.0` and its asset were created; only the registry upload and package link are missing for that version.) ## Changes - **release.yml:** repack the same prebuilt zip root-level for the Composer registry upload (the GitHub-style Release asset stays the `shopware-cli` zip). Steps are now idempotent (existing release/asset reused, registry 409 = published) and the "tag exists -> skip" guard is removed, so a failed run can be re-run to completion. - **Docs:** `CLAUDE.md` (PHP `^8.2`, real admin module, CI/release section) and the compliance spec refreshed after PR 13. - **Tests:** unit tests asserting `CreateDumpHandler` and `DumpService::delete` log to the injected PSR logger (not yet run; CI is the first run). - Version 0.1.1 + changelog (required by the PR check). ## Not verified - The repack step has only been checked by reading; the first real run is this PR's merge. - New tests have never been executed (mock signatures copied from `src/`). 🤖 Generated with [Claude Code](https://claude.com/claude-code) ___ ### **PR Type** Bug fix, Tests, Documentation ___ ### **Description** - Repack release zip root-level for registry - Make release workflow steps idempotent - Add PSR logger unit tests - Bump version and refresh docs ___ ### Diagram Walkthrough ```mermaid flowchart LR A["Release workflow"] -- "repack root-level" --> B["Composer registry zip"] A -- "idempotent release" --> C["Gitea release"] D["Logger tests"] -- "verify" --> E["Dump services"] F["Docs and version"] -- "refresh" --> G["Release docs"] ``` <details> <summary><h3> File Walkthrough</h3></summary> <table><thead><tr><th></th><th align="left">Relevant files</th></tr></thead><tbody><tr><td><strong>Tests</strong></td><td><details><summary>3 files</summary><table> <tr> <td><strong>CreateDumpHandlerTest.php</strong><dd><code>Add CreateDumpHandler PSR logging tests</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td> <td><a href="https://git.arthurerlich.de/haylan/AeonDumpManager/src/branch/fix/release-registry-zip/tests/MessageQueue/Handler/CreateDumpHandlerTest.php">+46/-0</a>&nbsp; &nbsp; </td> </tr> <tr> <td><strong>DumpServiceLoggingTest.php</strong><dd><code>Add DumpService delete logging tests</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td> <td><a href="https://git.arthurerlich.de/haylan/AeonDumpManager/src/branch/fix/release-registry-zip/tests/Service/DumpServiceLoggingTest.php">+66/-0</a>&nbsp; &nbsp; </td> </tr> <tr> <td><strong>RecordingLogger.php</strong><dd><code>Add PSR logger test double</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td> <td><a href="https://git.arthurerlich.de/haylan/AeonDumpManager/src/branch/fix/release-registry-zip/tests/Support/RecordingLogger.php">+16/-0</a>&nbsp; &nbsp; </td> </tr> </table></details></td></tr><tr><td><strong>Bug fix</strong></td><td><details><summary>1 files</summary><table> <tr> <td><strong>release.yml</strong><dd><code>Repack zip and make release idempotent</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td> <td><a href="https://git.arthurerlich.de/haylan/AeonDumpManager/src/branch/fix/release-registry-zip/.gitea/workflows/release.yml">+47/-26</a>&nbsp; </td> </tr> </table></details></td></tr><tr><td><strong>Documentation</strong></td><td><details><summary>3 files</summary><table> <tr> <td><strong>CHANGELOG.md</strong><dd><code>Add version 0.1.1 release notes</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td> <td><a href="https://git.arthurerlich.de/haylan/AeonDumpManager/src/branch/fix/release-registry-zip/CHANGELOG.md">+7/-0</a>&nbsp; &nbsp; &nbsp; </td> </tr> <tr> <td><strong>CLAUDE.md</strong><dd><code>Document admin module and CI release</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td> <td><a href="https://git.arthurerlich.de/haylan/AeonDumpManager/src/branch/fix/release-registry-zip/CLAUDE.md">+28/-2</a>&nbsp; &nbsp; </td> </tr> <tr> <td><strong>shopware-guideline-compliance.md</strong><dd><code>Update compliance spec after pipeline run</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td> <td><a href="https://git.arthurerlich.de/haylan/AeonDumpManager/src/branch/fix/release-registry-zip/docs/spec/shopware-guideline-compliance.md">+16/-12</a>&nbsp; </td> </tr> </table></details></td></tr><tr><td><strong>Configuration changes</strong></td><td><details><summary>1 files</summary><table> <tr> <td><strong>composer.json</strong><dd><code>Bump plugin version to 0.1.1</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td> <td><a href="https://git.arthurerlich.de/haylan/AeonDumpManager/src/branch/fix/release-registry-zip/composer.json">+1/-1</a>&nbsp; &nbsp; &nbsp; </td> </tr> </table></details></td></tr></tr></tbody></table> </details> ___
haylan added 4 commits 2026-10-03 22:50:32 +00:00
Gitea's registry answered 400 'composer.json file is missing' for the shopware-cli zip
(single top-level folder). Repack the same prebuilt content with composer.json at the root.
Drop the tag-exists skip guard so a half-finished release can be re-run; reuse an existing
release/asset. Bump to 0.1.1.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
docs: match CLAUDE.md to the idempotent release and registry repack
plugin-checks / version-changelog (pull_request) Successful in 22s
plugin-checks / package (pull_request) Successful in 1m12s
plugin-checks / phpunit (pull_request) Canceled after 3m1s
391db5b621
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
haylan added 1 commit 2026-10-03 22:53:29 +00:00
docs: research shopware-cli changelog handling and PHP floor
plugin-checks / version-changelog (pull_request) Successful in 22s
plugin-checks / package (pull_request) Successful in 1m1s
plugin-checks / phpunit (pull_request) Canceled after 5m12s
953f4ee579
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
haylan added 1 commit 2026-10-03 22:58:45 +00:00
fix(package): exclude .config and .gitea from the zip
plugin-checks / version-changelog (pull_request) Successful in 25s
plugin-checks / package (pull_request) Successful in 1m9s
plugin-checks / phpunit (pull_request) Canceled after 2m30s
eb2a3172e5
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 3 🔵🔵🔵⚪⚪
🧪 PR contains tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Repack validation

The repack step builds the archive with zip -qr "$OUT" ., which stores entries with a ./ prefix (e.g. ./composer.json). The following check unzip -l "$OUT" | grep -E ' composer\.json$' therefore does not match and the step exits with an error, so the release workflow will fail on the first real run. The check should match a root-level ./composer.json entry.

- name: Repack the zip for the Composer registry
  run: |
    set -e
    rm -rf /tmp/repack && mkdir /tmp/repack
    unzip -q ".build/${{ steps.meta.outputs.zip }}" -d /tmp/repack
    if [ -f /tmp/repack/composer.json ]; then
      ROOT=/tmp/repack
    else
      ROOT=$(find /tmp/repack -mindepth 1 -maxdepth 1 -type d | head -1)
    fi
    test -f "$ROOT/composer.json" || { echo "::error::no composer.json found in the packaged zip"; exit 1; }
    OUT="$PWD/.build/composer-${{ steps.meta.outputs.zip }}"
    (cd "$ROOT" && zip -qr "$OUT" .)
    unzip -l "$OUT" | grep -E ' composer\.json$' > /dev/null || { echo "::error::repacked zip has no root-level composer.json"; exit 1; }
    echo "repacked: $OUT"
## PR Reviewer Guide 🔍 <!-- pr-agent:review:full --> Here are some key observations to aid the review process: <table> <tr><td>⏱️&nbsp;<strong>Estimated effort to review</strong>: 3 🔵🔵🔵⚪⚪</td></tr> <tr><td>🧪&nbsp;<strong>PR contains tests</strong></td></tr> <tr><td>🔒&nbsp;<strong>No security concerns identified</strong></td></tr> <tr><td>⚡&nbsp;<strong>Recommended focus areas for review</strong><br><br> <details><summary><a href='https://git.arthurerlich.de/haylan/AeonDumpManager/src/branch/fix/release-registry-zip/.gitea/workflows/release.yml#L117-L131'><strong>Repack validation</strong></a> The repack step builds the archive with `zip -qr "$OUT" .`, which stores entries with a `./` prefix (e.g. `./composer.json`). The following check `unzip -l "$OUT" | grep -E ' composer\.json$'` therefore does not match and the step exits with an error, so the release workflow will fail on the first real run. The check should match a root-level `./composer.json` entry. </summary> ```yaml - name: Repack the zip for the Composer registry run: | set -e rm -rf /tmp/repack && mkdir /tmp/repack unzip -q ".build/${{ steps.meta.outputs.zip }}" -d /tmp/repack if [ -f /tmp/repack/composer.json ]; then ROOT=/tmp/repack else ROOT=$(find /tmp/repack -mindepth 1 -maxdepth 1 -type d | head -1) fi test -f "$ROOT/composer.json" || { echo "::error::no composer.json found in the packaged zip"; exit 1; } OUT="$PWD/.build/composer-${{ steps.meta.outputs.zip }}" (cd "$ROOT" && zip -qr "$OUT" .) unzip -l "$OUT" | grep -E ' composer\.json$' > /dev/null || { echo "::error::repacked zip has no root-level composer.json"; exit 1; } echo "repacked: $OUT" ``` </details> </td></tr> </table>
haylan added 1 commit 2026-10-03 23:01:23 +00:00
ci(phpunit): cache the installed database, key the cache on the Shopware version
plugin-checks / version-changelog (pull_request) Successful in 16s
plugin-checks / phpunit (pull_request) Failing after 27s
plugin-checks / package (pull_request) Successful in 59s
18844718d2
- resolve the latest 6.6.x from Packagist; cache key shopware-<version>-installed-v1
- cache the project plus a SQL dump of the installed shopware_test database; on a hit restore
  the dump instead of running system:install (~4.6 min)
- rename the step 'Install Shopware (once)' to 'Install Shopware'

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
haylan added 1 commit 2026-10-03 23:05:28 +00:00
ci: resolve the Shopware version with Composer from the plugin constraint; harden the registry repack
plugin-checks / version-changelog (pull_request) Successful in 18s
plugin-checks / package (pull_request) Successful in 1m3s
plugin-checks / phpunit (pull_request) Successful in 6m14s
8b2c2278d2
- phpunit: 'Resolve the latest Shopware Version' uses composer show against require.shopware/core
  from the plugin's composer.json (the Packagist scrape returned nothing on the first run)
- release: build the registry zip from an explicit file list without a leading ./ so the
  composer.json entry is stored at the zip root

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
haylan added 1 commit 2026-10-03 23:12:23 +00:00
ci: retrigger to exercise the cache-hit path
plugin-checks / version-changelog (pull_request) Successful in 21s
plugin-checks / package (pull_request) Successful in 1m1s
plugin-checks / phpunit (pull_request) Successful in 2m35s
7f3e77a3e9
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
haylan added 1 commit 2026-10-03 23:18:32 +00:00
chore: release as 0.0.6; compare the version check against published releases
plugin-checks / version-changelog (pull_request) Successful in 15s
plugin-checks / package (pull_request) Successful in 1m8s
plugin-checks / phpunit (pull_request) Successful in 2m34s
bfb88a25b8
- composer.json 0.0.6, CHANGELOG entries of the withdrawn 0.1.0/0.1.1 merged into [0.0.6]
- version-changelog: version must exceed the latest published release (main may carry a
  version whose release was withdrawn), instead of exceeding main's version

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
haylan scheduled this pull request to auto merge when all checks succeed 2026-10-03 23:19:58 +00:00
haylan merged commit 1176d3c87d into main 2026-10-03 23:21:08 +00:00
haylan deleted branch fix/release-registry-zip 2026-10-03 23:21:09 +00:00

PR Code Suggestions ✨

No code suggestions found for the PR.

## PR Code Suggestions ✨ <!-- pr-agent:improve:no-suggestions --> No code suggestions found for the PR.
Sign in to join this conversation.
No Reviewers
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: haylan/AeonDumpManager#14