Skip to content

fix: Fix Psalm warnings in test files#3264

Open
Copilot wants to merge 122 commits intomasterfrom
copilot/fix-psalm-warnings
Open

fix: Fix Psalm warnings in test files#3264
Copilot wants to merge 122 commits intomasterfrom
copilot/fix-psalm-warnings

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 1, 2026

  • Review baseline tooling status and verify local validation prerequisites
  • Inspect all five targeted files from the cleanup list
  • Remove stale/redundant transformer inline Psalm annotations if present
  • Remove repository method suppressions on findBy/findAll/findOneBy if present
  • Remove @phpstan-ignore return.type in save() if present
  • Verify and correct @psalm-param docblocks in RestRequestMapper.php
  • Run available validation for changed files and push updates

Copilot AI and others added 2 commits May 1, 2026 12:54
…after type annotation improvements

Agent-Logs-Url: https://github.com/tarlepp/symfony-flex-backend/sessions/0b39dc48-9bb2-48ca-98a6-2c2e95b90373

Co-authored-by: tarlepp <595561+tarlepp@users.noreply.github.com>
…arnings

# Conflicts:
#	tests/Integration/TestCase/EntityTestCase.php

Co-authored-by: tarlepp <595561+tarlepp@users.noreply.github.com>
Copilot AI and others added 30 commits May 5, 2026 19:27
…e call to fix PHPStan error

Agent-Logs-Url: https://github.com/tarlepp/symfony-flex-backend/sessions/ac4f260c-8984-42be-987a-60d070ff80cc

Co-authored-by: tarlepp <595561+tarlepp@users.noreply.github.com>
…ix Psalm MixedReturnTypeCoercion in getIds()

Agent-Logs-Url: https://github.com/tarlepp/symfony-flex-backend/sessions/ac9ebd19-0ce6-413b-89b5-7704060ee72e

Co-authored-by: tarlepp <595561+tarlepp@users.noreply.github.com>
- EnumType::convertToDatabaseValue($value) → mixed $value
- EnumType::convertToPHPValue($value) → mixed $value
- RestRequestMapper::map($source) → mixed $source
- RestRequestMapper::mapToObject($source, $destination) → mixed $source, object $destination

Matches existing pattern in UTCDateTimeType which already uses mixed $value.

Agent-Logs-Url: https://github.com/tarlepp/symfony-flex-backend/sessions/3045cfe7-b529-4f28-acf1-cb2165415bfc

Co-authored-by: tarlepp <595561+tarlepp@users.noreply.github.com>
…atisfy PHP interface compatibility

Adding `object` as a type hint narrows the parent MapperInterface::mapToObject's
untyped $destination parameter, which PHP rejects with a Fatal error. Use `mixed`
instead (which is compatible), and rely on the existing @psalm-param annotation for
more specific typing.

Agent-Logs-Url: https://github.com/tarlepp/symfony-flex-backend/sessions/5b143a84-a27c-422e-82e3-eae867a786f8

Co-authored-by: tarlepp <595561+tarlepp@users.noreply.github.com>
…plate annotations on Form types and DataTransformers

Agent-Logs-Url: https://github.com/tarlepp/symfony-flex-backend/sessions/cdbdf116-4a17-4c57-bfaa-3005a4854959

Co-authored-by: tarlepp <595561+tarlepp@users.noreply.github.com>
…rayObject<array-key, mixed> on StringableArrayObject

Agent-Logs-Url: https://github.com/tarlepp/symfony-flex-backend/sessions/cdbdf116-4a17-4c57-bfaa-3005a4854959

Co-authored-by: tarlepp <595561+tarlepp@users.noreply.github.com>
…pTransformer that conflict with @implements template

Agent-Logs-Url: https://github.com/tarlepp/symfony-flex-backend/sessions/90c29380-3b91-400f-b54d-b72d733ba8f6

Co-authored-by: tarlepp <595561+tarlepp@users.noreply.github.com>
… RoleTransformer that conflict with @implements template

Agent-Logs-Url: https://github.com/tarlepp/symfony-flex-backend/sessions/7974fed5-f5c1-4cff-9bea-178af2603273

Co-authored-by: tarlepp <595561+tarlepp@users.noreply.github.com>
…asts in RepositoryMethodsTrait and RestResourceBaseMethods

Agent-Logs-Url: https://github.com/tarlepp/symfony-flex-backend/sessions/8704d10b-523f-4b08-a231-02b33c38c3d8

Co-authored-by: tarlepp <595561+tarlepp@users.noreply.github.com>
…epositoryMethodsTrait and HealthzRepository

Agent-Logs-Url: https://github.com/tarlepp/symfony-flex-backend/sessions/8828e58e-b70a-49c3-b0c6-95427574f125

Co-authored-by: tarlepp <595561+tarlepp@users.noreply.github.com>
…r (Controller, RequestHandler, SearchTerm, BaseRepository)

Agent-Logs-Url: https://github.com/tarlepp/symfony-flex-backend/sessions/f18751f2-09b8-4bf3-9076-1baed7900b61

Co-authored-by: tarlepp <595561+tarlepp@users.noreply.github.com>
…scriber/decorator/repository/automapper/resolver layers

Agent-Logs-Url: https://github.com/tarlepp/symfony-flex-backend/sessions/e3f0befc-1be6-4476-a33d-15ac901d6913

Co-authored-by: tarlepp <595561+tarlepp@users.noreply.github.com>
…code and mb_convert_encoding results

Agent-Logs-Url: https://github.com/tarlepp/symfony-flex-backend/sessions/1aeba7bd-847f-43fc-80d5-7d09e1aca25b

Co-authored-by: tarlepp <595561+tarlepp@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants