Repository navigation
Prepare the v0.1.0 release - #6
Merged
Merged
Conversation
v1.0.1 sits ten commits behind main, so consumers on ^1.0 are not getting code that has landed -- and two of those commits are breaking and were never written down. Both arrived through org-wide sweeps rather than through a change to this package's own surface, which is how they escaped the changelog. The translation namespace became laranail/validation:: with no alias registered, so a key spelled the old way returns itself instead of a message. No exception, no warning -- the raw key renders where the validation error should be. That is the one worth reading the upgrade note for. The service provider moved into Providers/. Auto-discovery handles it; anything naming the class explicitly fatals at boot. rector-migrate-2.0.php rewrites it, and the config imports names so a consumer's diff is a one-line change to a use statement rather than a fully-qualified name left inline beside a stale import. Verified against a scratch Testbench case rather than assumed. Also corrects docs/release.md, which described the older flow: create the release, write the body, let CI write the changelog back. release.yml does the reverse -- it extracts the ## vX.Y.Z section OUT of CHANGELOG.md and exit 1s when it is missing. Following the page as written would have failed this release on its first step.
Benchmark results
|
There was a problem hiding this comment.
Pull request overview
Prepares the package for a v2.0.0 release by documenting two previously-unrecorded breaking changes (translation namespace + service provider namespace move), updating consumer-facing docs, and adding a Rector migration config to codemod the provider rename.
Changes:
- Add v2.0.0 upgrade guidance and a new
rector-migrate-2.0.phpcodemod for the provider class rename. - Update release process documentation to reflect that CI extracts the release body from
CHANGELOG.md. - Update package metadata/docs for the 2.x line (README stability section + Composer branch alias).
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
UPGRADING.md |
Adds v2.0.0 upgrade instructions for the two breaking changes. |
rector-migrate-2.0.php |
Introduces a Rector config to rewrite the service provider class reference. |
README.md |
Updates stability guidance to reference the 2.x line and the new migration script. |
docs/release.md |
Corrects the documented release flow to match CI behavior. |
composer.json |
Updates branch-alias to 2.0.x-dev (plus minor string encoding changes). |
CHANGELOG.md |
Adds the v2.0.0 section intended to be used as the release body. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
… calls Rector 2.6.4 swapped its bundled container from Illuminate's to Entropy's, and the new one has no tag(). driftingly/rector-laravel registers its node visitors with $rectorConfig->tag(), so the config fatals at load time with "Call to undefined method Rector\Config\RectorConfig::tag()". There is no stable rector-laravel built against the new container -- 2.6.0 requires rector/rector dev-main -- so the range takes a ceiling until one ships. This is a known-broken-release exclusion, not a pin; the lower bound stays open.
docs/release.md had two competing "1." lists -- one saying tag first, one saying changelog first. Merged into a single ordered list matching what release.yml actually does: write, verify extraction, commit, tag, push. UPGRADING.md showed the codemod with no target path, while the config itself documents `app/`. The config declares no paths, so as written the command did nothing. Added `app/` and a note on which other paths matter. CHANGELOG.md lost its `## Unreleased` heading when the section was renamed to v2.0.0, which left the file's own header note describing a section that no longer existed. Restored as a placeholder; verified the v2.0.0 body still extracts (41 lines). rector-migrate-2.0.php keeps `importShortClasses: false`. The flag gates only global-namespace classes -- ShortClassImportSkipVoter skips an import solely when the name has no separator -- so it cannot affect the provider rename. Documented why it diverges from rector.php rather than changing behaviour.
The org floors every package at v0.1.0 while pre-stable, so the 1.x and 2.0 tags on this repo are internal history rather than published releases. The two breaking changes this branch documents are real and still land -- they just land inside v0.1.0. - CHANGELOG: the release section is v0.1.0, and the withdrawn versions move under an "Internal history (not published)" heading. That heading is deliberately `##` so the release-body extractor still stops at the end of the v0.1.0 section; verified at 41 lines. - branch-alias: 2.0.x-dev -> 0.1.x-dev, so a dev checkout satisfies ^0.1. - README constrains to ^0.1. - rector-migrate-2.0.php -> rector-migrate-0.1.php, with the docblock reworded off the 1.x -> 2.0 framing. No content was dropped; the historical entries are kept for provenance.
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.
v1.0.1sits ten commits behindmain, so consumers on^1.0are not getting code that haslanded — and two of those commits are breaking and were never written down. Both arrived through
org-wide sweeps rather than a change to this package's own surface, which is how they escaped the
changelog.
composer tag-currencyis red onmaintoday, for exactly this reason.The two breaks
laranail-validation::→laranail/validation::…\Validation\Providers\ValidationServiceProviderBoth are breaking on a
1.xline, so 2.0.0.What's here
CHANGELOG.md— thev2.0.0section, which is whatrelease.ymlextracts as the release bodyUPGRADING.md— av2.0.0section per break, with thegrepandgit mvfor the published-translations caserector-migrate-2.0.php— codemods the provider rename. Configured withwithImportNames()so a consumer's diff is a one-lineusechange rather than a fully-qualified name left inline beside a stale import. Verified against a scratch Testbench casecomposer.json—branch-alias→2.0.x-devREADME.md— stability section to^2.0It also fixes
docs/release.mdThe page said: create the release, write the body, let CI write the changelog back.
release.ymldoes the reverse — it extracts the
## vX.Y.Zsection out ofCHANGELOG.mdandexit 1s whenit's missing. Following the page as written would have failed this release on its first step.
update-changelog.ymlonly backfills a hand-authored release and skips when the section exists.After merge
Tag
v2.0.0onmainand push it; CI does the release, benchmark injection and SBOM.Consumer constraint updates are deliberately not in here — nothing breaks on release, since every
consumer is pinned below 2.0.
validation-jsis the constrained one: it keeps this inrequire-devbecause validation is
^8.5and it is^8.4.1 || ^8.5, so it needs^0.1.1 || ^1.0 || ^2.0—widened, not replaced, or its 8.4 cells stop resolving.
6155 tests, PHPStan, Pint clean.