Repository navigation
Require Psalm 7.7 - #2312
Merged
Merged
Require Psalm 7.7#2312
Conversation
Psalm 7.6.0 is tagged, so the ^floor fallback for an untagged floor is no longer needed.
Psalm 7.7 no longer re-unions the impossible null at the restore's endif, so the injected @var there was reported as UnnecessaryVarAnnotation in every component view rendering a nested tag. The inner strip still needs it. - Rename AttributesRestoreReassert to AttributesStripReassert - Bump ShadowManifest::MARKER_PASS_VERSION to drop cached shadows
CI resolves 7.7.0 already; the tests now pin its behavior. - ClassLikeStorageProvider::remove() takes the declaring file path - First-class callables bind templates per call: Route::domain(...) moves from the known-limitation test to RouteDomainTest - Untyped override params inherit the parent's docblock types - Nullsafe outer fetch on the proxy gains |null (vimeo/psalm#13936)
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain, including the Psalm 7.7 compatibility updates and associated test, CI, baseline, and Blade behavior changes.
No open issues 🎉
What changed in this PR
This pull request updates the 4.x branch to require Psalm 7.7 and adapts Blade analysis, tests, CI configuration, and baselines to Psalm 7.7 behavior.
Changes:
- Raises the Psalm dependency and pins CI, benchmark, Docker, and delta-app jobs to the 7.7 floor.
- Replaces Blade restore-point reassertion with inner attribute-strip reassertion and invalidates cached shadows.
- Refreshes Psalm diagnostics, route callable coverage, unit-test cleanup calls, documentation, and the application baseline.
| File | Description |
|---|---|
| tests/Unit/Internal/ConfiguredDateClassTest.php | Updates Psalm storage cleanup calls with the required file-path argument. |
| tests/Unit/Internal/ClassLineageTest.php | Updates class storage cleanup calls for Psalm 7.7. |
| tests/Unit/Handlers/Eloquent/Support/RelationResolverDescendantTest.php | Updates descendant storage cleanup calls for the new Psalm API. |
| tests/Unit/Handlers/Eloquent/Schema/CastResolverTest.php | Updates date-class storage cleanup calls. |
| tests/Unit/Handlers/Eloquent/ResolveColumnTypeTest.php | Updates model storage cleanup calls. |
| tests/Unit/Handlers/Eloquent/ModelPropertyHandlerTest.php | Updates model storage cleanup calls. |
| tests/Unit/Handlers/Eloquent/ModelAggregatePropertyHandlerTest.php | Updates aggregate-handler storage cleanup calls. |
| tests/Unit/Blade/ShadowCompilerTest.php | Adjusts Blade compiler tests for strip reassertion behavior. |
| tests/Unit/Blade/PreludeBuilderTest.php | Updates component-view typing documentation. |
| tests/Unit/Blade/BladeIssueRemapTest.php | Updates Blade remapping assertions and restores Psalm 7.7 regression coverage. |
| tests/Unit/Blade/AttributesStripReassertTest.php | Tests the renamed inner-strip reassertion implementation. |
| tests/Type/tests/TaintAnalysis/TaintedIncludeViewFactory.phpt | Adds Psalm 7.7's updated mixed-argument diagnostic. |
| tests/Type/tests/RouteDomainTest.phpt | Adds first-class callable coverage for Route::domain() branch resolution. |
| tests/Type/tests/RouteDomainKnownLimitation.phpt | Removes the first-class callable limitation resolved by Psalm 7.7. |
| tests/Type/tests/Relation/RelationCallbackReceiverBindingTest.phpt | Updates inherited parameter-type diagnostic expectations. |
| tests/Type/tests/CollectionFilterCallbackParamTest.phpt | Updates Psalm 7.7 union callback diagnostic expectations. |
| tests/Type/tests/Collection/HigherOrderProxyPropertyFetchTest.phpt | Updates nullsafe property-fetch coverage and diagnostic expectations. |
| tests/Type/tests/Collection/HigherOrderProxyPropertyFetchItemTypeKnownLimitation.phpt | Documents Psalm 7.7's remaining nullable nullsafe outer-fetch limitation. |
| tests/Benchmark/Dockerfile | Removes the obsolete Psalm tag fallback and pins the benchmark to the declared floor. |
| tests/Application/laravel-test-psalm-baseline.xml | Refreshes the application baseline for Psalm 7.7 diagnostics. |
| stubs/common/Routing/Route.phpstub | Removes the obsolete first-class-callable limitation from the route stub documentation. |
| src/Blade/ShadowManifest.php | Bumps the shadow manifest version to invalidate stale compiled shadows. |
| src/Blade/ShadowCompiler.php | Applies the updated attribute-strip reassertion pass. |
| src/Blade/AttributesStripReassert.php | Reasserts attributes after Laravel's inner except() strip. |
| docs/contributing/blade.md | Documents the updated Blade reassertion behavior and limitations. |
| composer.json | Raises the Psalm requirement to ^7.7.0@stable. |
| bin/ci/delta-app.sh | Removes the obsolete untagged-Psalm fallback. |
| .github/workflows/tests.yml | Pins the Symfony Console compatibility job to Psalm 7.7. |
| .github/workflows/benchmark.yml | Removes the obsolete benchmark Psalm tag lookup fallback. |
Review effort: Lite
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.
Issue to Solve
todo-byon4.xis red: the Psalm 7.6.0 reminders expired (the ^floor fallback in benchmark and delta jobs, the@devpin in the Symfony Console 6.4 job).^7.6.0already resolves it. On 7.7.0, unchanged4.xfails 6 type tests, 53 unit tests and the Application baseline.<x-...>tag reportsUnnecessaryVarAnnotation: Psalm no longer re-unions the impossiblenullat the tag restore'sendif, so the plugin's injected@varthere is redundant.Related
@todo-byRedundantConditionon a nullsafe comparison in a ternary)Solution Description
vimeo/psalm ^7.7.0@stable; the Symfony Console 6.4 job requires^7.7@stable.git ls-remotefallback is gone).AttributesRestoreReassertbecomesAttributesStripReassertand only re-asserts after the innerexcept()strip, which 7.7 still needs.ShadowManifest::MARKER_PASS_VERSIONis bumped so cached shadows are rebuilt.Route::domain(...)as a first-class callable now resolves each branch: moved fromRouteDomainKnownLimitationtoRouteDomainTest.MissingParamType, a trueMixedArgumentonView\Factory::file()),InvalidArgumentinstead ofArgumentTypeCoercionfor an unrelated union member,??messages naming the operand, andClassLikeStorageProvider::remove()taking a file path.ExampleResource::toArray()(themake:resourceshape) is nowInvalidReturnType/InvalidReturnStatementinstead ofMixedReturnTypeCoercion.test:app.Checklist
tests/Type/and/or unit test intests/Unit/)docs/contributing/blade.md)