Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OCP class throws private exception #35633

Open
nickvergessen opened this issue Dec 6, 2022 · 1 comment
Open

OCP class throws private exception #35633

nickvergessen opened this issue Dec 6, 2022 · 1 comment
Labels
1. to develop Accepted and waiting to be taken care of enhancement technical debt

Comments

@nickvergessen
Copy link
Member

Talk was catching it for a while but with the Psalm5 update it started complaining:

ERROR: UndefinedClass - lib/TInitialState.php:143:13 - Class, interface or enum named OC\User\NoUserException does not exist (see https://psalm.dev/019)
			} catch (NoUserException $e) {

use OC\User\NoUserException;

* @throws NoUserException

Also extending the non public Emitter is not too good, but I'm totally fine providing a stub for that. But the OC catch I don't want to "mock".

I guess we need to make a new class, but if that extends the private one Psalm will complain again...

@nickvergessen nickvergessen added enhancement 1. to develop Accepted and waiting to be taken care of technical debt labels Dec 6, 2022
@nickvergessen nickvergessen added this to the Nextcloud 26 milestone Dec 6, 2022
@blizzz blizzz modified the milestones: Nextcloud 26, Nextcloud 27 Mar 9, 2023
@skjnldsv skjnldsv removed this from the Nextcloud 27.0.2 milestone Aug 8, 2023
@joshtrichards
Copy link
Member

Related: #33239

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. to develop Accepted and waiting to be taken care of enhancement technical debt
Projects
None yet
Development

No branches or pull requests

4 participants