Repository navigation
feat!: deprecate full and make it default for extension validate - #1618
Malte Janz (MalteJanz) merged 17 commits into
Conversation
Assisted-by: OpenAI Codex
…ort-what-actually-ran
BREAKING CHANGE: this changes the behaviour of extension validate
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (6)
Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review. 📝 WalkthroughWalkthroughExtension validation now runs all checkers by default. The deprecated ChangesExtension validation selection
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Feature Merge Risk: ⚪ Minimal · up to Validation now runs all checkers by default. Callers needing the previous behavior can use --only sw-cli; --full remains accepted. No actionable merge-blocking issue remains. Security Architecture ReviewSecurity architecture risk: 🟡 Moderate · up to Ordinary validation now reaches project PHP bootstrapping under the caller's privileges. Validating an untrusted extension can therefore expose a developer machine or CI job to more than metadata inspection. Using --only sw-cli preserves the previous checker selection. Retained concerns
Security review detailsSecurity Blast Radius
Security Findings and Attack Paths
Trust Boundaries and Controls
Resilience and Maintainability Implications
Hardening Proposals
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 7.69% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 52 functions across 13 files. (4 skipped: 4 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
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. Comment |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1618 +/- ##
=======================================
Coverage 65.72% 65.72%
=======================================
Files 462 462
Lines 30935 30928 -7
=======================================
- Hits 20332 20328 -4
+ Misses 10603 10600 -3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Lena Forlin (moshimorschi)
left a comment
There was a problem hiding this comment.
One thing to note before we release this:
This PR only changes the CLI, but our release pipelines pick it up automatically. The store-release and build-zip actions in shopware/github-actions always install the latest CLI and run plain shopware-cli extension validate <zip>, no flags (same in the reusable workflows: build-zip.yml, store-release.yml). Today that call runs only the built-in checks, but with this PR the same call runs all checkers, since the old default is now --only sw-cli and the actions don't pass it.
As soon as a release contains this PR, it means PHPStan, ESLint and Stylelint on the zip, and any error fails the job before the store upload.
I tried the new default on SwagPayPal, SwagCmsExtensions, SwagLanguagePack and SwagMigrationAssistant, and all four fail. So the next release of most Swag* and Frosh extensions would go red without anyone touching those repos.
Draft PR here: shopware/github-actions#201
…recate-full-and-make-it-default-for-extension-validate
shopware/shopware-cli#1618 makes extension validate run all checkers by default and names the built-in checker builtin. build-zip and store-release install the latest CLI and call extension validate without flags, so release runs would pick up the new default and fail before the store upload. Pass --only builtin, which keeps these steps on the checks they run today. The released 0.18.5 ignores --only without --full and still runs the built-in checks, so this is safe to merge ahead of the CLI release.
shopware/shopware-cli#1618 makes extension validate run all checkers by default. build-zip and store-release install the latest CLI and call extension validate without flags, so release runs would pick up the new default and fail before the store upload. Pass --only sw-cli, which is what these steps run today and which the current 0.18.5 release already accepts.
Lena Forlin (moshimorschi)
left a comment
There was a problem hiding this comment.
everything should be ready :)
…recate-full-and-make-it-default-for-extension-validate
What changed?
Warning
This is a proposal, up for discussion, that contains a breaking change to the default behaviour and output of
extension validateextension validatecommand behaves the same as with the--fullflag before, just that this is now the defaultWhy?
The old behavior can still be achieved with
--only sw-cliand having no--fullflag makes thevalidatecommand consistent with thefixandformatcommands. Additionally it makes the--only+--excludeflags easier to understand if you don't have to consider--fullor not.But this change could potentially cause an inconvience for some setups:
--fullcheck could suddenly report errors for projects.sw-clitool.--only sw-cliflag or fix all newly discovered issues (which is a win in itself)TLDR: I personally think this change is a win for user / developer experience of this command while only being a minor inconvenience to adjust to the breaking change. Additionally we are not at a semantic stable version 1.0 with the CLI anyways while we of course try our best to keep the CLI surface stable.
How was this tested?
just run
shopware-cli extension validate . --fulland without--full, the output should be the same. Having the flag also provides a deprecation warning.Related issue or discussion
Discovered + depends on #1611
Summary by CodeRabbit
extension validatenow runs all available checkers by default, including PHPStan, ESLint, and Stylelint.--onlyto select specific checkers or--excludeto omit them. The deprecated--fullflag remains accepted but no longer affects validation; use--only sw-clito run just the built-in checker.