Skip to content

fix(psalm): resolve remaining type issues flagged by Psalm 7 - #14014

Merged
ChristophWurst merged 1 commit into
mainfrom
fix/psalm-v7-prep-3
Nov 2, 2026
Merged

ChristophWurst merged 1 commit into
mainfrom
fix/psalm-v7-prep-3

Conversation

@ChristophWurst

Copy link
Copy Markdown
Member

Follow-up to #13932 and #13933. After both merged, I rebased the open Psalm v7 bump (#13243) to see what was left, and two things had slipped through the first two batches, both because they were a second occurrence of a pattern already fixed once in the same file.

The three FeatureExtraction classes (Important/Read/Replied) each have two array accesses keyed by the same possibly-null $email, and only the first one in each file got the suppression comment in #13932 - the second (reading flaggedMessages/readMessages/repliedMessages) was missed. MessageMapper (Db) had a second, different possibly-null argument from the one fixed in #13932: $recipient->getLabel() going into mb_strcut() when writing recipient rows. Address's own fromRaw() already treats a missing label as "use the email instead", so this does the same rather than suppressing.

Ran the full unit test suite and composer cs:check locally, both clean.

Assisted-by: Claude:claude-sonnet-5

@nextcloud-command nextcloud-command added the AI assisted This PR contains AI-assisted commits label Nov 2, 2026
Follow-up to #13932 and #13933: re-ran the open Psalm v7 bump (#13243)
after both of those merged to see what was left. Two things slipped
through the first two batches.

- The three FeatureExtraction classes each had a second array access
  (flaggedMessages/readMessages/repliedMessages) using the same
  possibly-null $email key as the one already suppressed; only the
  first access per file got a suppression comment.
- MessageMapper (Db) had a second, different possibly-null argument:
  $recipient->getLabel() passed into mb_strcut() when building
  recipient rows. Address's own fromRaw() already treats "no label"
  as "fall back to the email", so this does the same instead of
  suppressing.

Assisted-by: Claude:claude-sonnet-5
Signed-off-by: Christoph Wurst <1374172+ChristophWurst@users.noreply.github.com>
@ChristophWurst
ChristophWurst enabled auto-merge (squash) November 2, 2026 18:46
@ChristophWurst
ChristophWurst merged commit 82af55e into main Nov 2, 2026
46 checks passed
@ChristophWurst
ChristophWurst deleted the fix/psalm-v7-prep-3 branch November 2, 2026 19:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review AI assisted This PR contains AI-assisted commits bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants