Skip to content

Conversation

@backportbot-nextcloud
Copy link

@backportbot-nextcloud backportbot-nextcloud bot commented Oct 12, 2020

⚠️ This backport had conflicts and is incomplete ⚠️

backport of #23310

The QBMapper is kind of a generic type, though this concept does not
exist in php. Hence you have a lot of type coercion in subtypes (mappers
in the individual apps) because you suddenly don't expect an Entity[]
but your specific type.

Luckily Psalm lets us type those. Then in the subclass you can
psalm-implement the mapper with a concrete type and psalm will do all
the magic to ensure types are used correctly.

Signed-off-by: Christoph Wurst <[email protected]>
Copy link
Member

@ChristophWurst ChristophWurst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems complete to me

@MorrisJobke
Copy link
Member

Bildschirmfoto 2020-10-12 um 13 41 26

vs

Bildschirmfoto 2020-10-12 um 13 41 29

@ChristophWurst
Copy link
Member

Yes, because I only had the bot backport one of two commits: the one with the API annotations. Not the one that changes internal code :)

@MorrisJobke MorrisJobke merged commit aff0156 into stable20 Oct 12, 2020
@MorrisJobke MorrisJobke deleted the backport/23310/stable20 branch October 12, 2020 11:50
@MorrisJobke MorrisJobke mentioned this pull request Oct 15, 2020
5 tasks
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.

3 participants