Skip to content

chore: update Psalm to v6 - #11224

Draft
ChristophWurst wants to merge 13 commits into
mainfrom
test/psalm-6
Draft

chore: update Psalm to v6#11224
ChristophWurst wants to merge 13 commits into
mainfrom
test/psalm-6

Conversation

@ChristophWurst

Copy link
Copy Markdown
Member

No description provided.

ChristophWurst and others added 5 commits March 16, 2026 08:32
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Signed-off-by: Christoph Wurst <1374172+ChristophWurst@users.noreply.github.com>
Signed-off-by: Christoph Wurst <1374172+ChristophWurst@users.noreply.github.com>
Signed-off-by: Christoph Wurst <1374172+ChristophWurst@users.noreply.github.com>
Signed-off-by: Christoph Wurst <1374172+ChristophWurst@users.noreply.github.com>
Signed-off-by: Christoph Wurst <1374172+ChristophWurst@users.noreply.github.com>

# Conflicts:
#	composer.json
#	composer.lock
- InteractionListener: guard foreach against null getRecipients()
- Version1130Date20220412111833: cast tempnam() result to string
- TransformURLScheme: suppress NullArgument for intentional null URI params
- InternalAddressController: handle nullable return from add()
- OptionalIndicesListener: fix @template-implements to use AddMissingIndicesEvent
- psalm-baseline.xml: remove 2 stale UnusedBaselineEntry items

AI-assisted: OpenCode (claude-sonnet-4.6)
Signed-off-by: Christoph Wurst <1374172+ChristophWurst@users.noreply.github.com>
- Bump nextcloud/rector to ^0.5.0 with new migration rules
- Migrate IConfig app-value calls to IAppConfig (getValueString/setValueString)
  in AntiSpamService, AiIntegrationsService, ClassificationSettingsService,
  and ContextChatSettingsService; remove now-unused IConfig injection
- Update corresponding unit tests to mock IAppConfig instead of IConfig
- Finalize standalone test classes (final class)
- Replace createMock with createStub where no expectations are needed
- Add (string) casts in assertStringContainsString calls to satisfy type checker
- Convert single-expression closures to arrow functions

AI-assisted: OpenCode (claude-sonnet-4.6)
Signed-off-by: Christoph Wurst <1374172+ChristophWurst@users.noreply.github.com>
…lity

- Fix @return static -> @return self in JsonResponse success/fail/error
- Fix psalm-suppress comment in TransformURLScheme for Psalm 6 syntax
- Add @psalm-suppress to MessageApiController get/getAttachment
- Replace stale AttachmentService baseline entries with correct snippets
- Add missing baseline entries for all remaining Psalm 6 type errors

AI-assisted: OpenCode (claude-sonnet-4.6)
Signed-off-by: Christoph Wurst <1374172+ChristophWurst@users.noreply.github.com>
# Conflicts:
#	lib/Controller/AvatarsController.php
#	lib/Controller/InternalAddressController.php
#	tests/psalm-baseline.xml
pull Bot pushed a commit to dwongdev/mail that referenced this pull request Jul 22, 2026
Psalm 6 enables stricter checks that surface a few pre-existing type
issues in code that Psalm 5 accepted. These are behaviour-preserving
and can land on main ahead of the Psalm 6 upgrade (nextcloud#11224):

- strictBinaryOperands: add explicit (float) casts where int and float
  operands are mixed (MessageMapper, PerformanceLoggerTask) and (string)
  casts when concatenating ints (JmapClientFactory)
- MissingOverrideAttribute: add #[\Override] to jsonSerialize() in
  Delegation and sendRequest() in JmapClientAdapter

Assisted-by: Claude:claude-opus-4-8
Signed-off-by: Christoph Wurst <1374172+ChristophWurst@users.noreply.github.com>
@kesselb kesselb mentioned this pull request Aug 19, 2026
1 task
pull Bot pushed a commit to dwongdev/mail that referenced this pull request Aug 22, 2026
Extracts behaviour-preserving type fixes from the Psalm 6 bump (nextcloud#11224)
so the eventual version bump stays small: align JsonResponse factory
return docblocks with their self return type, null-guard the recipient
iteration in InteractionListener, correct the OptionalIndicesListener
event template, and cast the tempnam() result in the 1130 migration.

Pure Psalm suppressions and the version/baseline changes stay with the
bump PR.

Assisted-by: Claude:claude-opus-4-8
Signed-off-by: Christoph Wurst <1374172+ChristophWurst@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants