Repository navigation
chore(deps): allow mezzio-router 4.x - #12
Merged
Merged
Conversation
The constraint was ^3.15 only, so Composer could not resolve this package alongside anything on the router 4 line: it either failed or forced a downgrade to 3.20.0. ACL already carries ^3.15 || ^4.0 and passes on 4.2.0, and every router symbol this package uses is unchanged in 4.x, so the constraint was the only obstacle. Verified on 4.2.0: unit 23/23, integration 1/1, mago format/lint/analyze/ guard clean, mutation MSI 97% against this repository's 95% gate.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
mezzio/mezzio-routerwas constrained to^3.15alone, so Composer could not resolve this package alongside anything on the router 4 line: it either failed outright or forced a downgrade to 3.20.0. That blocked adding any new dependency to applications that already sit on router 4.Why this is safe
webware-aclalready declares"mezzio/mezzio-router": "^3.15 || ^4.0", is locked to 4.2.0 and passes on it. ItsRouteResourcewraps aRouteResultand callsgetMatchedRoute(),getMatchedParams()andgetMatchedRouteName(), a deeper router surface than this package uses.RouteCollectorInterface(getRoutes()),RouteResult(isFailure(),getMatchedRouteName()) andRouteas a type hint. All three exist in 4.2.0. Nothing extends or implementsRouteResultorRoute, so 4.x makingRouteResultfinal with a private constructor andfromRoute()/fromRouteFailure()factories is not a problem for this code.false|stringreturn:is_string($matchedRouteName) && '' !== $matchedRouteName ? $matchedRouteName : null.Mezzio\Router\RouteProviderInterfaceandMezzio\MiddlewareFactoryInterfacecome frommezzio/mezzio, notmezzio-router, so the router major never touched them.mezzio/mezzioitself permits^3.15.0 || ^4.0.0, so this only makes our own constraint match its range.Verification on 4.2.0
composer update mezzio/mezzio-router:3.20.0 => 4.2.0, 0 installs, 0 removals, nothing else moved.mago format --check,mago lint,mago analyze,mago guard: clean.Known debt, pre-existing and untouched here
Two mutants escape in
src/NavigationContainer.php:Continue_at line 158 andCastStringat line 178. This change contains no PHP, so the mutant set is identical to before it; these are burn-down items rather than regressions.