Skip to content

fix: detect local path-repository plugins during project upgrade - #1475

Merged
Soner (shyim) merged 2 commits into
mainfrom
cursor/fix-local-plugin-upgrade-81fb
Sep 1, 2026
Merged

fix: detect local path-repository plugins during project upgrade#1475
Soner (shyim) merged 2 commits into
mainfrom
cursor/fix-local-plugin-upgrade-81fb

Conversation

@shyim

@shyim Soner (shyim) commented Aug 31, 2026

Copy link
Copy Markdown
Member

Fixes #1463

What changed?

shopware-cli project upgrade treated Composer path-repository plugins (typically under custom/static-plugins) as missing Packagist packages, so compatibility showed 1.0.0 -> none and blocked the upgrade. project autofix composer-plugins also re-scanned those already-managed plugins after resolving vendor symlinks back into custom/, then failed on composer require.

  • Path and other unpublished packages are now classified from the installed composer.json / lock require (usually shopware/core). A constraint that allows the target is OK; one that does not still blocks, with the actual constraint in the message.
  • Autofix skips packages already present in composer.lock or composer.json require.
  • Upgrade rewrites no longer open path packages to *.

Why?

Plugin developers keep local plugins in custom/static-plugins and manage them with Composer path repositories. The upgrade wizard should check those plugins' own Shopware constraints instead of looking for a published release that does not exist.

How was this tested?

Unit tests covering the reported layout (custom/static-plugins/* path repo, lock dist.type: path, vendor symlink):

  • Compatible ~6.7.0ExtOK, available 1.0.0
  • Incompatible ~6.6.0ExtBlocked with the constraint in the detail
  • Autofix scan no longer lists an already-managed path plugin
  • Readiness treats the path plugin as Composer-managed
  • Overlay copy for a blocked local plugin points at the shopware/core constraint instead of “ask the vendor”
go test ./internal/shop/upgrade/ ./internal/shop/pluginmigrate/ ./internal/tui/upgrade/ ./internal/tui/pluginmigrate/

Related issue or discussion

#1463

Open in Web Open in Cursor 

Summary by CodeRabbit

  • Bug Fixes

    • Prevented Composer-managed extensions, including local path-based plugins, from being offered for migration again.
    • Improved compatibility checks for local and unpublished extensions using their declared Shopware requirements.
    • Extensions without remote metadata are now flagged for review instead of being incorrectly blocked.
    • Upgrade preparation now preserves constraints for locally installed path-based extensions.
  • User Experience

    • Added clearer upgrade guidance and status messaging for blocked local extensions.
    • Local extension paths are now shown in relevant upgrade details.

@coderabbitai

coderabbitai Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: 5ecff630-050e-410d-b2ee-5ed119e2ca47

📥 Commits

Reviewing files that changed from the base of the PR and between 7c619b5 and 2330f52.

📒 Files selected for processing (11)
  • internal/shop/pluginmigrate/migrator.go
  • internal/shop/pluginmigrate/pluginmigrate_test.go
  • internal/shop/upgrade/compat.go
  • internal/shop/upgrade/compat_test.go
  • internal/shop/upgrade/composerjson.go
  • internal/shop/upgrade/composerjson_test.go
  • internal/shop/upgrade/readiness.go
  • internal/shop/upgrade/readiness_test.go
  • internal/shop/upgrade/types.go
  • internal/tui/upgrade/model_test.go
  • internal/tui/upgrade/overlay_extension_detail.go

📝 Walkthrough

Walkthrough

Changes

Local Composer Plugin Upgrade Support

Layer / File(s) Summary
Extension discovery and metadata
internal/shop/upgrade/types.go, internal/shop/upgrade/readiness.go, internal/shop/upgrade/readiness_test.go
Extension discovery now uses composer.lock to identify Composer-managed and path-installed extensions. It records local Composer requirements and validates the detection flow.
Local constraint classification
internal/shop/upgrade/compat.go, internal/shop/upgrade/compat_test.go
Path-installed and unpublished extensions use local Shopware constraints. Missing constraints return ExtReview.
Composer rewrite preservation
internal/shop/upgrade/composerjson.go, internal/shop/upgrade/composerjson_test.go
Upgrade rewrites preserve constraints for path-installed packages and continue to update other packages.
Migration scan filtering
internal/shop/pluginmigrate/migrator.go, internal/shop/pluginmigrate/pluginmigrate_test.go
Migration scanning skips extensions already managed through Composer requirements or lock data.
Local plugin upgrade display
internal/tui/upgrade/overlay_extension_detail.go, internal/tui/upgrade/model_test.go
Blocked path-installed extensions show local-plugin status, their path, and guidance to update the shopware/core constraint.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Project
  participant discoverExtensions
  participant classifyExtension
  participant RewriteComposerJSON
  participant extensionDetail
  Project->>discoverExtensions: Read composer.lock and installed extensions
  discoverExtensions->>classifyExtension: Provide PathInstalled and Require
  classifyExtension-->>extensionDetail: Return ExtOK, ExtBlocked, or ExtReview
  Project->>RewriteComposerJSON: Rewrite upgrade constraints
  RewriteComposerJSON-->>Project: Preserve path-installed constraints
Loading
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch cursor/fix-local-plugin-upgrade-81fb

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov-commenter

Codecov Comments Bot (codecov-commenter) commented Aug 31, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 90.09901% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 62.72%. Comparing base (7c619b5) to head (2330f52).
⚠️ Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
internal/shop/upgrade/compat.go 82.85% 6 Missing ⚠️
internal/shop/pluginmigrate/migrator.go 87.50% 2 Missing ⚠️
internal/shop/upgrade/readiness.go 92.30% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1475      +/-   ##
==========================================
+ Coverage   62.61%   62.72%   +0.11%     
==========================================
  Files         436      436              
  Lines       29415    29500      +85     
==========================================
+ Hits        18419    18505      +86     
+ Misses      10996    10995       -1     
Flag Coverage Δ
go-test 62.72% <90.09%> (+0.11%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@shyim
Soner (shyim) force-pushed the cursor/fix-local-plugin-upgrade-81fb branch from 46ed75b to 30b2732 Compare August 31, 2026 07:44
@shyim
Soner (shyim) changed the base branch from main to test/shared-testhelper-fixtures August 31, 2026 07:44
@shyim
Soner (shyim) force-pushed the cursor/fix-local-plugin-upgrade-81fb branch from 30b2732 to 85a48ab Compare August 31, 2026 12:39
@shyim
Soner (shyim) force-pushed the cursor/fix-local-plugin-upgrade-81fb branch from 85a48ab to d5575bf Compare August 31, 2026 12:56
@shyim
Soner (shyim) force-pushed the cursor/fix-local-plugin-upgrade-81fb branch from d5575bf to 65a7d19 Compare September 1, 2026 02:44
@shyim
Soner (shyim) force-pushed the cursor/fix-local-plugin-upgrade-81fb branch from 65a7d19 to 08f0aa0 Compare September 1, 2026 03:25
Base automatically changed from test/shared-testhelper-fixtures to main September 1, 2026 03:25
project upgrade treated Composer path-repository plugins (custom/static-plugins)
as missing Packagist packages, so compatibility showed "none" and blocked.
autofix composer-plugins also re-scanned those already-managed plugins after
resolving vendor symlinks back into custom/.

Classify path and other unpublished packages from the installed composer.json
require, skip already-required plugins during autofix, and keep path packages
pinned instead of rewriting them to "*".

Co-authored-by: xai <xai@shyim.de>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@shyim
Soner (shyim) force-pushed the cursor/fix-local-plugin-upgrade-81fb branch from 08f0aa0 to 2330f52 Compare September 1, 2026 03:26
@shyim
Soner (shyim) merged commit 5d2a0fb into main Sep 1, 2026
4 of 5 checks passed
@shyim
Soner (shyim) deleted the cursor/fix-local-plugin-upgrade-81fb branch September 1, 2026 03:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Can't update Shopware with local plugins installed using shopware-cli project upgrade

4 participants