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

Move \OC\User\NoUserException to OCP #33239

Closed
wants to merge 2 commits into from

Conversation

juliusknorr
Copy link
Member

The NoUserException might be useful for apps and is already used quite a lot as IRootFolder::getUserFolder may throw it.

First commit is the new class, second refactors the server usages.

@juliusknorr juliusknorr requested review from a team, PVince81, skjnldsv, come-nc and CarlSchwan and removed request for a team July 15, 2022 12:49
@juliusknorr juliusknorr added this to the Nextcloud 25 milestone Jul 15, 2022
@github-actions
Copy link
Contributor

Possible performance regression detected

Show Output
1 queries added

≠ /remote.php/dav/files/test with 1 queries added
  + UPDATE "oc_preferences" SET "configvalue" = :dcValue1 WHERE ("userid" = :dcValue2) AND ("appid" = :dcValue3) AND ("configkey" = :dcValue4)
≠ /remote.php/dav/files/test/test.txt with 1 queries removed
  - UPDATE "oc_preferences" SET "configvalue" = :dcValue1 WHERE ("userid" = :dcValue2) AND ("appid" = :dcValue3) AND ("configkey" = :dcValue4)
≠ /remote.php/dav/files/test/many_files with 1 queries added
  + UPDATE "oc_preferences" SET "configvalue" = :dcValue1 WHERE ("userid" = :dcValue2) AND ("appid" = :dcValue3) AND ("configkey" = :dcValue4)
= /remote.php/dav/files/test/new_file.txt
= /remote.php/dav/files/test/new_file.txt

@CarlSchwan
Copy link
Member

Possible performance regression detected
Show Output

This bot is not working correctly :(

@juliusknorr juliusknorr force-pushed the techdebt/nouserexception branch from 55bffd4 to d8e6255 Compare July 18, 2022 12:59
@juliusknorr
Copy link
Member Author

Failures don't seem related, but re-triggered failed jobs.

This was referenced Aug 12, 2022
This was referenced Aug 24, 2022
* @throws NoUserException
* @throws \OCP\User\NoUserException
Copy link
Contributor

Choose a reason for hiding this comment

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

Not consistent with having a use, you do not need to namespace it here

* @throws NoUserException
* @throws \OCP\User\NoUserException
Copy link
Contributor

Choose a reason for hiding this comment

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

Same

@@ -366,7 +366,7 @@ public static function initMountManager() {
* Initialize system and personal mount points for a user
*
* @param string|IUser|null $user
* @throws \OC\User\NoUserException if the user is not available
* @throws \OCP\User\NoUserException if the user is not available
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* @throws \OCP\User\NoUserException if the user is not available
* @throws NoUserException if the user is not available

* @throws NoUserException
* @throws \OCP\User\NoUserException
Copy link
Contributor

Choose a reason for hiding this comment

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

Same

@@ -340,16 +340,16 @@ public function testHooks() {
*
*/
public function testLocalMountWhenUserDoesNotExist() {
$this->expectException(\OC\User\NoUserException::class);
$this->expectException(\OCP\User\NoUserException::class);
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
$this->expectException(\OCP\User\NoUserException::class);
$this->expectException(NoUserException::class);

public function testNullUserThrows() {
$this->expectException(\OC\User\NoUserException::class);
$this->expectException(\OCP\User\NoUserException::class);
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
$this->expectException(\OCP\User\NoUserException::class);
$this->expectException(NoUserException::class);

@come-nc
Copy link
Contributor

come-nc commented Sep 1, 2022

/rebase

This was referenced Sep 6, 2022
@skjnldsv skjnldsv mentioned this pull request Sep 15, 2022
This was referenced Sep 20, 2022
@blizzz blizzz removed this from the Nextcloud 25 milestone Sep 22, 2022
@blizzz blizzz added this to the Nextcloud 26 milestone Sep 22, 2022
@skjnldsv skjnldsv added 2. developing Work in progress and removed 3. to review Waiting for reviews labels Oct 23, 2022
@skjnldsv
Copy link
Member

Comments to address :)

@blizzz blizzz mentioned this pull request Feb 1, 2023
This was referenced May 3, 2023
@blizzz blizzz mentioned this pull request May 17, 2023
@blizzz blizzz modified the milestones: Nextcloud 27, Nextcloud 28 May 23, 2023
@juliusknorr
Copy link
Member Author

Closing as I don't see time near to properly finish this for now

@skjnldsv skjnldsv deleted the techdebt/nouserexception branch March 14, 2024 07:47
@skjnldsv skjnldsv removed this from the Nextcloud 28 milestone Aug 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants