Skip to content

docs: expand upgrade guide (2.x → 3.0) with breaking changes and legacy note - #27

Merged
gdespirito merged 3 commits into
mainfrom
readme-upgrade-guide
Jul 11, 2026
Merged

docs: expand upgrade guide (2.x → 3.0) with breaking changes and legacy note#27
gdespirito merged 3 commits into
mainfrom
readme-upgrade-guide

Conversation

@gdespirito

@gdespirito gdespirito commented Jul 11, 2026

Copy link
Copy Markdown
Member

Expands the "Upgrading" section of the README and fixes the release numbering:

  • ⚠️ The package already had a legacy 2.0.42.2.0 series on Packagist (tags without v prefix, PHP 5.4+ era). The modernized release is therefore v3.0.0, not v2.0.0 — the erroneous v2.0.0 release/tag (which collided with the old 2.0 tag) was deleted.
  • Explicit note that the legacy 2.x series remains available and compatible with PHP 5.4+ (with the composer require freshwork/chilean-bundle:^2.2 pin).
  • Each breaking change now has its own subsection with before/after code examples (format() throwing, vnSeparator() type fix).
  • Deprecations table (scape_chars(), legacy facade).
  • "What's new in v3" summary linking back to the feature docs.

🤖 Generated with Claude Code

https://claude.ai/code/session_01WvDYWr2Tx3diCV3NXGrKRX

Summary by CodeRabbit

  • Documentation
    • Updated the README’s PHP/Laravel legacy pin guidance to the newer freshwork/chilean-bundle version.
    • Replaced “Upgrading from 1.x” with an “Upgrading from 2.x” / v3.0 section.
    • Documented v3 breaking changes: format()/normalize() now throw InvalidFormatException for invalid RUTs when exceptions are enabled, while quiet() retains the prior false behavior.
    • Clarified that vnSeparator() now accepts a string, and expanded the deprecations table and “What’s new” coverage.

…y note

- Before/after examples for each breaking change
- Explicit note that 1.x remains available and compatible with PHP 5.4+
- Deprecations table and summary of what's new in v2

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WvDYWr2Tx3diCV3NXGrKRX
@coderabbitai

coderabbitai Bot commented Jul 11, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 5c8c151c-9eaa-4b82-8a6f-123f9b8824d7

📥 Commits

Reviewing files that changed from the base of the PR and between ac80de0 and 66356c5.

📒 Files selected for processing (1)
  • README.md
✅ Files skipped from review due to trivial changes (1)
  • README.md

📝 Walkthrough

Walkthrough

README.md updates legacy PHP/Laravel version pinning and replaces the former 1.x upgrade notes with v3.0 guidance covering compatibility, breaking changes, deprecations, and new components.

Changes

v3.0 upgrade documentation

Layer / File(s) Summary
README v3.0 upgrade guidance
README.md
Updates the legacy version pin to ^2.2 and documents invalid-RUT exceptions, quiet() behavior, the vnSeparator() type change, deprecation mappings, Laravel namespace changes, and v3 additions.

Estimated code review effort: 1 (Trivial) | ~3 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the README upgrade guide expansion, including the 2.x→3.0 upgrade path, breaking changes, and legacy note.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch readme-upgrade-guide

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

The package already had 2.0.4–2.2.0 tags on Packagist (PHP 5.4+ era),
so the modernized release must be v3.0.0 and the upgrade guide now
points legacy users to ^2.2 instead of ^1.0.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WvDYWr2Tx3diCV3NXGrKRX
@gdespirito gdespirito changed the title docs: expand upgrade guide with breaking changes and 1.x note docs: expand upgrade guide (2.x → 3.0) with breaking changes and legacy note Jul 11, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@README.md`:
- Around line 368-370: Update the “What’s new in v2” section to make each listed
feature directly link to its corresponding documentation section or anchor,
including Rut enhancements, Iva, Clp, Phone, Region, Comuna, the cl_phone rule,
Rules\Rut, RutCast, and Laravel integration; avoid relying only on the phrase
“documented above.”
- Around line 334-336: Clarify the Laravel compatibility statement in the “PHP
8.2+ (and Laravel 11+) required” section: align it with the actual supported
Laravel range based on the package’s composer requirements and APIs, or add an
explicit Laravel 11+ constraint in composer.json if that minimum is intentional.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 63082957-9343-466f-a7e7-9cdaf2cf5ab4

📥 Commits

Reviewing files that changed from the base of the PR and between 63c1943 and 815b7e3.

📒 Files selected for processing (1)
  • README.md

Comment thread README.md Outdated
Comment thread README.md Outdated
Comment on lines +368 to +370
### What's new in v2

Besides the modernized `Rut` (with `Rut::check()`, `Rut::random()`, `RutFormat` enum, `Stringable`/`JsonSerializable`), v2 adds `Iva`, `Clp`, `Phone`, `Region` and `Comuna`, plus the `cl_phone` validation rule, the `Rules\Rut` rule object and the `RutCast` Eloquent cast — all documented above.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Link the listed v2 features to their documentation.

The objective calls for feature-documentation links, but these feature names are plain text and only refer readers to “documented above.” Add direct links or anchors for the listed packages, rules, cast, and Laravel integration.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@README.md` around lines 368 - 370, Update the “What’s new in v2” section to
make each listed feature directly link to its corresponding documentation
section or anchor, including Rut enhancements, Iva, Clp, Phone, Region, Comuna,
the cl_phone rule, Rules\Rut, RutCast, and Laravel integration; avoid relying
only on the phrase “documented above.”

@gdespirito

Copy link
Copy Markdown
Member Author

Addressed both findings: the README now states Laravel 10+ (the contracts we rely on — ValidationRule, typed CastsAttributes — were introduced in Laravel 10; the suite tests against 11/12), and every feature in "What's new in v3" now links to its documentation anchor.

@gdespirito
gdespirito merged commit 9953bb3 into main Jul 11, 2026
6 checks passed
@gdespirito
gdespirito deleted the readme-upgrade-guide branch July 11, 2026 05:57
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.

1 participant