Document plugin version file keys omit the v prefix - #266
matteotrubini wants to merge 1 commit into
Conversation
|
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 (1)
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review. WalkthroughThe update documentation changes version keys in its examples to omit the Priority: ⬇️ Low Estimated code review effort: 1 (Trivial) | ~3 minutes Merge Risk: ⚪ Minimal · up to The documentation clarifies the version-key and script-path conventions without changing runtime behavior; no actionable merge risk remains. Architecture SummaryArchitecture risk: 🔵 Low · up to The change affects 1 system. Changed systems: Architecture concerns Review detailsSystems and components
Before / after behavior
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 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 |
The example on this page used
v-prefixed keys ("v1.0.1"), which is the opposite of the convention: thevbelongs to migration and seed directory names, and to the script paths referenced from the file — not to the keys.This is not cosmetic.
version_compare()ordersvbelow any digit, so a file mixing prefixed and unprefixed keys rendered the changelog out of order — exactly the situation this page was leading authors into, since its example used a prefixed key on a plugin whose real keys are unprefixed.Fixed on the core side by wintercms/winter#1560, which compares on the normalized version while preserving the keys as written.
The corrected examples now match
create:plugin(modules/system/console/scaffold/plugin/version.stub) and the first-party plugins thatarchitecture/maintainer-guide.mdpoints to as reference files — both of which use unprefixed keys withv-prefixed script paths.Keys keep their quotes: an unquoted
1.0parses as a float and is truncated to1as a PHP array key. See thewinter/samplefixture in the core repo, whose YAML deliberately produces non-string keys.Also adds the note explaining the keys/directories distinction. The pre-existing note is preserved as the second paragraph of the same blockquote, following the convention used elsewhere in this repo.
Summary by CodeRabbit
vprefix from version keys while retaining it in migration and seed paths.