Wire Psalm into CI, fix a real bug it found in user-migration import

RepositoryImportSource::copyToFolder() called putContent() on the generic
return type of Node::get(), which doesn't declare that method -- only
File does. Existing-file overwrite during a per-user restore would have
fatally errored at runtime; added an instanceof check and a resource leak
fix (finally-close) while there. Also guarded getFileAsStream() against
fopen() returning false.

Everything else Psalm (strict level) currently flags is mechanical
(missing `final` on leaf classes -- applied everywhere safe) or pre-existing
array-shape/type gaps, captured in psalm-baseline.xml so CI fails only on
new issues from here on, not the whole backlog at once.
This commit is contained in:
2026-10-05 11:45:37 +02:00
parent 48ea6bb33d
commit 807353cbe4
58 changed files with 626 additions and 60 deletions
+1 -1
View File
@@ -22,7 +22,7 @@ use OCP\Server;
* object is built only while it is used; nothing is mounted. files_external is loaded for its
* classes but its enabled/disabled state is left as the admin set it.
*/
class TargetService {
final class TargetService {
public function __construct(
private TargetMapper $mapper,
private KeyService $keys,