chore: sort root composer.json replace and autoload-dev alphabetically#54
Merged
chore: sort root composer.json replace and autoload-dev alphabetically#54
Conversation
…etically Both blocks had drifted into chronological/append order as packages were added over time. Composer auto-sorts `require`/`require-dev` (via the `sort-packages: true` config) but does NOT touch `repositories`, `replace`, or `autoload-dev.psr-4` — those need manual maintenance. For nested namespaces (e.g. `Marko\Cache\File\Tests\`), the parent's own `\Tests\` entry is placed first, then siblings sorted alphabetically. This matches the existing convention used for `Cache`, `Database`, `Filesystem`, `Http`, `Inertia`, `Log`, `Mail`, `Notification`, `PubSub`, `Queue`, `Session`, `Translation`, and `View`. Also documents the rule in `.claude/pr-review-process.md` so future contributors keep these blocks sorted when adding new packages. No behavior change — pure key reorder; tests pass (4889/4889).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
composer.jsonreplaceblock alphabetically (only 3 entries were out of place:marko/http,marko/http-guzzle,marko/layouthad drifted past the inertia siblings)composer.jsonautoload-dev.psr-4block alphabetically — this had significant drift; ~25 entries were out of order (Authentication,Queue\*,RateLimiting,Scheduler,Translation\*,View\*,Notification\*,Pagination,Api,Sse,PubSub\*,Amphp, etc. were all appended chronologically as packages were added).claude/pr-review-process.mdso future contributors keep these blocks sorted when adding new packagesWhy
Composer auto-sorts
require/require-dev(via"sort-packages": trueinconfig), but does NOT touchrepositories,replace, orautoload-dev.psr-4. Those drifted into append-order because no convention was documented and no tooling enforces it. As the package list grew past ~50 entries, the file became hard to scan and prone to the same accidental duplication / mis-placement that cropped up during the recent inertia-companion PRs (#51/#52/#53) where conflict resolution was uglier than it needed to be.Sort rule
Pure alphabetical, with one nuance for nested namespaces: when a namespace family has both a parent (e.g.
Marko\Cache\Tests\) and children (Marko\Cache\File\Tests\,Marko\Cache\Memory\Tests\), the parent's own\Tests\entry comes first, then children alphabetically. This matches the existing convention used acrossCache,Database,Filesystem,Http,Inertia,Log,Mail,Notification,PubSub,Queue,Session,Translation, andView.Test plan
composer validate --strict --no-check-lock— passescomposer dump-autoload— cleancomposer test— 4889/4889 pass (no behavior change; pure key reorder)🤖 Generated with Claude Code