Skip to content

Conversation

@CarlSchwan
Copy link
Member

  • Reflect the actual return value returned by the implementation in the
    the interface. E.g. IUser|bool -> IUser|false
  • Remove $hasLoggedIn parameter from private countUser implementation.
    Replace the two call with the equivalent countSeenUser
  • getBackend is nuallable, add this to the interface
  • Use backend interface to make psalm happy about call to undefined
    methods. Also helps with getting rid at some point of the old
    implementActions

Test plan

  1. Psalm is now happier
  2. Unit tests work locally
  3. Webui and users interactions also seems to work normally without regressions

@CarlSchwan CarlSchwan added the 3. to review Waiting for reviews label May 13, 2022
@CarlSchwan CarlSchwan added this to the Nextcloud 25 milestone May 13, 2022
@CarlSchwan CarlSchwan self-assigned this May 13, 2022
@CarlSchwan CarlSchwan force-pushed the fix/psalm-userbackend branch from 8aba719 to 6320f62 Compare May 13, 2022 11:19
@CarlSchwan CarlSchwan requested a review from kesselb May 20, 2022 13:56
- Reflect the actual return value returned by the implementation in the
  the interface. E.g. IUser|bool -> IUser|false
- Remove $hasLoggedIn parameter from private countUser implementation.
  Replace the two call with the equivalent countSeenUser
- getBackend is nuallable, add this to the interface
- Use backend interface to make psalm happy about call to undefined
  methods. Also helps with getting rid at some point of the old
  implementActions

Signed-off-by: Carl Schwan <[email protected]>
@CarlSchwan CarlSchwan force-pushed the fix/psalm-userbackend branch from 6320f62 to 9ec0cb0 Compare May 20, 2022 15:15
@CarlSchwan
Copy link
Member Author

ci failure unrelated

@CarlSchwan CarlSchwan merged commit 8d599c3 into master May 23, 2022
@CarlSchwan CarlSchwan deleted the fix/psalm-userbackend branch May 23, 2022 09:41
* @since 15.0.0
*/
public function getBackend();
public function getBackend(): ?UserInterface;
Copy link
Member

Choose a reason for hiding this comment

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

This is a breaking change. Any implementation of IUser needs to adjust their signature line to include this.
Can we avoid it and just go with @return UserInterface|null instead?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants