Migrations generated via occ fail psalm validation
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 36.9k
- Forks
- 5.2k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 713
Description
Actually such migrations fail psalm:
Error: ….php:42:56: MoreSpecificImplementedParamType: Argument 2 of …::changeSchema has the more specific type 'Closure():OCP\DB\ISchemaWrapper', expecting 'Closure' as defined by OCP\Migration\SimpleMigrationStep::changeSchema (see https://psalm.dev/140)
So I guess we have to revert it or update the base class as well?
Originally posted by @nickvergessen in https://github.com/nextcloud/server/issues/34488#issuecomment-1275904697
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the generated migration mentioned in the Psalm error and inspect OCP\Migration\SimpleMigrationStep::changeSchema, focusing on the Closure type mismatch. Run Psalm against a generated migration to reproduce the failure; done means migrations generated via occ pass validation without this error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100