Skip to content

fix(lock): only return string app names from getAppName - #1393

Merged
juliusknorr merged 1 commit into
mainfrom
fix/psalm-get-app-name
Oct 28, 2026
Merged

juliusknorr merged 1 commit into
mainfrom
fix/psalm-get-app-name

Conversation

@juliusknorr

Copy link
Copy Markdown
Member

A localized <name> in an app's info.xml makes IAppManager::getAppInfo() return an array, so getAppName() threw a TypeError on its ?string return type. The @var array{name: null} annotation on main and stable35 only hid that from psalm. On stable32 to stable34 psalm fails on this line, which blocks every Dependabot PR there.

  • Drop the annotation and only return string names
  • Regression test in tests/Unit/Service/LockServiceTest.php

Backports: stable35 via backportbot. stable32 to stable34 will be done by hand, since the test needs a different constructor mock there (ConfigService instead of IAppConfig).

A localized <name> in info.xml makes getAppInfo() return an array, which threw a TypeError on the ?string return type. Drop the misleading psalm annotation and only return string names.

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Julius Knorr <jus@bitgrid.net>
@juliusknorr

Copy link
Copy Markdown
Member Author

/backport to stable35

@juliusknorr
juliusknorr merged commit 646d451 into main Oct 28, 2026
48 checks passed
@juliusknorr
juliusknorr deleted the fix/psalm-get-app-name branch October 28, 2026 20:25
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.

2 participants