Update parameter 3#189
Merged
Merged
Conversation
respect/parameter 3.0 renamed the resolver: the contract is now the `Resolver` interface and the PSR-11-backed implementation is `ContainerResolver` (the static helpers `reflectCallable()` and `acceptsType()` live on the concrete class). - composer: require respect/parameter ^3.0 (was ^1.0) - DispatchContext: instantiate `new ContainerResolver($this)`; keep `Resolver` as the interface return type of `resolver()` - Routines (Through, When, By, AuthBasic) and Routes\Callback: call the static helpers via `ContainerResolver::` Resolution behavior is unchanged: container-by-type injection does not consume a positional slot, so type-injected params (e.g. a PSR-7 request) and positional URL params resolve identically regardless of parameter order, exactly as with 1.0.
These issues predate the parameter migration; they surfaced when the suite moved to PHPUnit 13, which exits non-zero on warnings/deprecations and adds the `new.resultUnused` strict-rules check. - AbstractRoutineTest: extend the existing phpstan ignore on the deliberately-invalid `new Stub(...)` line to also cover `new.resultUnused` (the line exists to assert the constructor throws) - DispatchContextTest: replace deprecated `$this->any()` expectations in getMockForRoute() with a stub (`->method()`) for the no-args case and `expects($this->atLeastOnce())` for the arg-matching case, which the sole caller does invoke - RouterTest: compare the magic/concrete Callback routes by their observable state (method, pattern, arguments) instead of whole-object assertEquals, avoiding the closure-comparison warning `composer qa` is now green (phpcs, phpstan, phpunit 326 tests).
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #189 +/- ##
=========================================
Coverage 98.51% 98.51%
Complexity 394 394
=========================================
Files 31 31
Lines 1007 1007
=========================================
Hits 992 992
Misses 15 15 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
No description provided.