-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Migrate away from OC_App and toward IAppManager. #44025
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
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
644036a
fix: Migrate away from OC_App toward the IAppManager
come-nc 8c5f323
fix: use DI to build main Application class in console.php
come-nc 0e7bac7
fix: Make sure that AppManager can be built before Nextcloud is insta…
come-nc 733a818
fix: Migrate a few more classes away from OC_App::getAppPath
come-nc a0be3ff
fix: Fix tests following OC_App migrations to IAppManager
come-nc 1b5a0c3
fix: Fix RouterTest by adding IAppManager
come-nc 61621ee
fix: Revert to OC_App in places where we need all apps even disabled …
come-nc ac1d868
fix: Lazy load IURLGenerator from AppManager to avoid installation crash
come-nc File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,7 @@ | ||
| <?php | ||
|
|
||
| declare(strict_types=1); | ||
|
|
||
| /** | ||
| * @copyright Copyright (c) 2016, ownCloud, Inc. | ||
| * | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,7 @@ | ||
| <?php | ||
|
|
||
| declare(strict_types=1); | ||
|
|
||
| /** | ||
| * @copyright Copyright (c) 2018, Patrik Kernstock <[email protected]> | ||
| * | ||
|
|
@@ -68,7 +71,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int | |
| $appId = $input->getArgument('app-id'); | ||
|
|
||
| // Check if the app is installed | ||
| if (!\OC_App::getAppPath($appId)) { | ||
| if (!$this->manager->isInstalled($appId)) { | ||
| $output->writeln($appId . ' is not installed'); | ||
| return 1; | ||
| } | ||
|
|
@@ -135,7 +138,7 @@ public function completeOptionValues($optionName, CompletionContext $context): a | |
| */ | ||
| public function completeArgumentValues($argumentName, CompletionContext $context): array { | ||
| if ($argumentName === 'app-id') { | ||
| return \OC_App::getAllApps(); | ||
| return $this->manager->getInstalledApps(); | ||
| } | ||
| return []; | ||
| } | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,7 @@ | ||
| <?php | ||
|
|
||
| declare(strict_types=1); | ||
|
|
||
| /** | ||
| * @copyright Copyright (c) 2018, michag86 ([email protected]) | ||
| * | ||
|
|
@@ -117,7 +120,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int | |
| if ($result === false) { | ||
| $output->writeln($appId . ' couldn\'t be updated'); | ||
| $return = 1; | ||
| } elseif ($result === true) { | ||
| } else { | ||
| $output->writeln($appId . ' updated'); | ||
| } | ||
| } | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Check notice
Code scanning / Psalm
DeprecatedMethod