Restore router refactor + README fix dropped from PR #1 merge - #2
Merged
Conversation
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>
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.
Restores 2 commits that were dropped from PR #1's merge
614defa(README install simplification) and5f8d6df(router refactor) reachedthe
chore/oss-php85-releasebranch on GitHub after the squash/mergehappened, so they never landed in
master. This PR cherry-picks them onto afresh branch off the current master so nothing is lost.
What returns
phroute/phroute(unmaintained, last release 2018) replaced by a built-inHelper\Router— same route DSL, no config change for users. Removes 3implicit-nullable deprecations that would become fatal on PHP 9.
Verification
composer validate✓ on both PHP 8.4 and 8.5phpcsclean,phpstanlevel 7[OK] No errorsphpunit: 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