Skip to content

refactor!: cache routes as json - #14

Merged
shadowhand merged 1 commit into
mainfrom
refactor/cache-json
Oct 27, 2026
Merged

shadowhand merged 1 commit into
mainfrom
refactor/cache-json

Conversation

@shadowhand

Copy link
Copy Markdown
Owner

No description provided.

@github-actions

This comment was marked as outdated.

@shadowhand

Copy link
Copy Markdown
Owner Author

/robin

@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

The Robin Hood of code review

✅ Review done. I flagged 3 things worth a look.

Push fixes whenever you like, then comment /robin for another pass.

Robin v2.12.3 · antongulin/robin@main (3c3c2ad) · diff-only review (agent mode off)

@github-actions github-actions 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.

The Robin Hood of code review

Heads up: this is a point-in-time review. Push fixes freely, then comment /robin whenever you want another pass.

⚠️ 1 Medium | 🔵 1 Low | 💡 1 Suggestions

Summary

The diff replaces PHP serialization with JSON for route caching and adds JsonSerializable plus runtime type coercion for Route and RouteCollection, which removes the unserialize RCE risk and centralizes cache validation. The round-trip design and added tests are generally sound. The main outstanding issues are documentation and API-change hygiene: docs/cache.md still references the old default cache file name after the code default changed, and the narrowed RouteCache return types were not reflected in the changelog.


📄 Findings Not Posted Inline

💡 1 (CHANGELOG.md) — The Unreleased changelog entry does not note the narrowed return types on RouteCache::read() and RouteCache::write().

Add a changelog entry for the API change.

Comment thread src/Cache/RouteCache.php
Comment thread docs/cache.md Outdated
@shadowhand
shadowhand merged commit 5cc5f28 into main Oct 27, 2026
5 checks passed
@shadowhand
shadowhand deleted the refactor/cache-json branch October 27, 2026 10:53
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