Skip to content

Restore router refactor + README fix dropped from PR #1 merge - #2

Merged
Xakki merged 2 commits into
masterfrom
fix/restore-router-and-readme
May 24, 2026
Merged

Restore router refactor + README fix dropped from PR #1 merge#2
Xakki merged 2 commits into
masterfrom
fix/restore-router-and-readme

Conversation

@Xakki

@Xakki Xakki commented May 23, 2026

Copy link
Copy Markdown
Owner

Restores 2 commits that were dropped from PR #1's merge

614defa (README install simplification) and 5f8d6df (router refactor) reached
the chore/oss-php85-release branch on GitHub after the squash/merge
happened, so they never landed in master. This PR cherry-picks them onto a
fresh branch off the current master so nothing is lost.

What returns

  • README install block simplified now that the package is on Packagist.
  • phroute/phroute (unmaintained, last release 2018) replaced by a built-in
    Helper\Router — same route DSL, no config change for users. Removes 3
    implicit-nullable deprecations that would become fatal on PHP 9.

Verification

  • composer validate ✓ on both PHP 8.4 and 8.5
  • phpcs clean, phpstan level 7 [OK] No errors
  • phpunit: 101 tests, 0 deprecations (the 3 phroute deprecations are gone)

This PR is intentionally scoped to just the restoration; the Emailer::i() /
NullExpresion clean-up lands in a separate PR on top of this one.

🤖 Generated with Claude Code

Xakki and others added 2 commits May 23, 2026 19:47
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
phroute/phroute (last release 2018) emitted implicit-nullable deprecations that
become fatal on PHP 9. It was used only by Emailer::dispatchRoute and a handler
resolver — both replaced by a ~70-line Helper\Router that keeps the exact same
route DSL (filters :i/:a/:c/:h), so ConfigService::$route is unchanged.

- add src/Helper/Router.php (+ RouterTest); fold handler resolution into dispatchRoute
- remove src/Helper/HandlerResolverRoute.php and the phroute dependency
- dispatchRoute now sets the response code from the exception's httpCode
- 101 tests green on PHP 8.4 & 8.5, 0 deprecations, line coverage 70.26%

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@Xakki
Xakki merged commit 4e7d5ea into master May 24, 2026
3 checks passed
@Xakki
Xakki deleted the fix/restore-router-and-readme branch May 24, 2026 13:34
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