Skip to content

Require Psalm 7.7 - #2312

Merged
alies-dev merged 3 commits into
4.xfrom
alies-dev/cleanup-770
Nov 16, 2026
Merged

alies-dev merged 3 commits into
4.xfrom
alies-dev/cleanup-770

Conversation

@alies-dev

Copy link
Copy Markdown
Collaborator

Issue to Solve

  • todo-by on 4.x is red: the Psalm 7.6.0 reminders expired (the ^floor fallback in benchmark and delta jobs, the @dev pin in the Symfony Console 6.4 job).
  • Psalm 7.7.0 is out and ^7.6.0 already resolves it. On 7.7.0, unchanged 4.x fails 6 type tests, 53 unit tests and the Application baseline.
  • On 7.7.0 every component view rendering a nested <x-...> tag reports UnnecessaryVarAnnotation: Psalm no longer re-unions the impossible null at the tag restore's endif, so the plugin's injected @var there is redundant.

Related

Solution Description

  • Require vimeo/psalm ^7.7.0@stable; the Symfony Console 6.4 job requires ^7.7@stable.
  • Benchmark, Docker benchmark and delta jobs pin the exact floor again (the git ls-remote fallback is gone).
  • Blade: AttributesRestoreReassert becomes AttributesStripReassert and only re-asserts after the inner except() strip, which 7.7 still needs. ShadowManifest::MARKER_PASS_VERSION is bumped so cached shadows are rebuilt.
  • Route::domain(...) as a first-class callable now resolves each branch: moved from RouteDomainKnownLimitation to RouteDomainTest.
  • Tests updated to 7.7 output: inherited parent param types (no MissingParamType, a true MixedArgument on View\Factory::file()), InvalidArgument instead of ArgumentTypeCoercion for an unrelated union member, ?? messages naming the operand, and ClassLikeStorageProvider::remove() taking a file path.
  • Application baseline refreshed: ExampleResource::toArray() (the make:resource shape) is now InvalidReturnType/InvalidReturnStatement instead of MixedReturnTypeCoercion.
  • Verified on 7.7.0: type tests, unit tests, self-analysis, test:app.

Checklist

  • Tests cover the change (type test in tests/Type/ and/or unit test in tests/Unit/)
  • Documentation is updated (docs/contributing/blade.md)

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)
@alies-dev alies-dev self-assigned this Nov 16, 2026
@alies-dev
alies-dev requested a lite review from Copilot November 16, 2026 12:37
@alies-dev
alies-dev merged commit cd21a47 into 4.x Nov 16, 2026
29 checks passed
@alies-dev
alies-dev deleted the alies-dev/cleanup-770 branch November 16, 2026 12:40

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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

@alies-dev alies-dev added the release:fix for PRs only (used by release-drafter) label Nov 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release:fix for PRs only (used by release-drafter)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants