Skip to content

Commit

Permalink
Merge pull request #34196 from nextcloud/backport/34190/stable25
Browse files Browse the repository at this point in the history
[stable25] remove CoreBundle as we now ship the lat app that was referenced there
  • Loading branch information
blizzz authored Sep 22, 2022
2 parents 079a8c0 + aff9302 commit c6c4328
Show file tree
Hide file tree
Showing 10 changed files with 4 additions and 351 deletions.
2 changes: 0 additions & 2 deletions lib/composer/composer/autoload_classmap.php
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,6 @@
'OC\\App\\AppManager' => $baseDir . '/lib/private/App/AppManager.php',
'OC\\App\\AppStore\\Bundles\\Bundle' => $baseDir . '/lib/private/App/AppStore/Bundles/Bundle.php',
'OC\\App\\AppStore\\Bundles\\BundleFetcher' => $baseDir . '/lib/private/App/AppStore/Bundles/BundleFetcher.php',
'OC\\App\\AppStore\\Bundles\\CoreBundle' => $baseDir . '/lib/private/App/AppStore/Bundles/CoreBundle.php',
'OC\\App\\AppStore\\Bundles\\EducationBundle' => $baseDir . '/lib/private/App/AppStore/Bundles/EducationBundle.php',
'OC\\App\\AppStore\\Bundles\\EnterpriseBundle' => $baseDir . '/lib/private/App/AppStore/Bundles/EnterpriseBundle.php',
'OC\\App\\AppStore\\Bundles\\GroupwareBundle' => $baseDir . '/lib/private/App/AppStore/Bundles/GroupwareBundle.php',
Expand Down Expand Up @@ -1462,7 +1461,6 @@
'OC\\Repair\\Owncloud\\CleanPreviews' => $baseDir . '/lib/private/Repair/Owncloud/CleanPreviews.php',
'OC\\Repair\\Owncloud\\CleanPreviewsBackgroundJob' => $baseDir . '/lib/private/Repair/Owncloud/CleanPreviewsBackgroundJob.php',
'OC\\Repair\\Owncloud\\DropAccountTermsTable' => $baseDir . '/lib/private/Repair/Owncloud/DropAccountTermsTable.php',
'OC\\Repair\\Owncloud\\InstallCoreBundle' => $baseDir . '/lib/private/Repair/Owncloud/InstallCoreBundle.php',
'OC\\Repair\\Owncloud\\MigrateOauthTables' => $baseDir . '/lib/private/Repair/Owncloud/MigrateOauthTables.php',
'OC\\Repair\\Owncloud\\MoveAvatars' => $baseDir . '/lib/private/Repair/Owncloud/MoveAvatars.php',
'OC\\Repair\\Owncloud\\MoveAvatarsBackgroundJob' => $baseDir . '/lib/private/Repair/Owncloud/MoveAvatarsBackgroundJob.php',
Expand Down
2 changes: 0 additions & 2 deletions lib/composer/composer/autoload_static.php
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,6 @@ class ComposerStaticInit749170dad3f5e7f9ca158f5a9f04f6a2
'OC\\App\\AppManager' => __DIR__ . '/../../..' . '/lib/private/App/AppManager.php',
'OC\\App\\AppStore\\Bundles\\Bundle' => __DIR__ . '/../../..' . '/lib/private/App/AppStore/Bundles/Bundle.php',
'OC\\App\\AppStore\\Bundles\\BundleFetcher' => __DIR__ . '/../../..' . '/lib/private/App/AppStore/Bundles/BundleFetcher.php',
'OC\\App\\AppStore\\Bundles\\CoreBundle' => __DIR__ . '/../../..' . '/lib/private/App/AppStore/Bundles/CoreBundle.php',
'OC\\App\\AppStore\\Bundles\\EducationBundle' => __DIR__ . '/../../..' . '/lib/private/App/AppStore/Bundles/EducationBundle.php',
'OC\\App\\AppStore\\Bundles\\EnterpriseBundle' => __DIR__ . '/../../..' . '/lib/private/App/AppStore/Bundles/EnterpriseBundle.php',
'OC\\App\\AppStore\\Bundles\\GroupwareBundle' => __DIR__ . '/../../..' . '/lib/private/App/AppStore/Bundles/GroupwareBundle.php',
Expand Down Expand Up @@ -1495,7 +1494,6 @@ class ComposerStaticInit749170dad3f5e7f9ca158f5a9f04f6a2
'OC\\Repair\\Owncloud\\CleanPreviews' => __DIR__ . '/../../..' . '/lib/private/Repair/Owncloud/CleanPreviews.php',
'OC\\Repair\\Owncloud\\CleanPreviewsBackgroundJob' => __DIR__ . '/../../..' . '/lib/private/Repair/Owncloud/CleanPreviewsBackgroundJob.php',
'OC\\Repair\\Owncloud\\DropAccountTermsTable' => __DIR__ . '/../../..' . '/lib/private/Repair/Owncloud/DropAccountTermsTable.php',
'OC\\Repair\\Owncloud\\InstallCoreBundle' => __DIR__ . '/../../..' . '/lib/private/Repair/Owncloud/InstallCoreBundle.php',
'OC\\Repair\\Owncloud\\MigrateOauthTables' => __DIR__ . '/../../..' . '/lib/private/Repair/Owncloud/MigrateOauthTables.php',
'OC\\Repair\\Owncloud\\MoveAvatars' => __DIR__ . '/../../..' . '/lib/private/Repair/Owncloud/MoveAvatars.php',
'OC\\Repair\\Owncloud\\MoveAvatarsBackgroundJob' => __DIR__ . '/../../..' . '/lib/private/Repair/Owncloud/MoveAvatarsBackgroundJob.php',
Expand Down
28 changes: 4 additions & 24 deletions lib/private/App/AppStore/Bundles/BundleFetcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,16 @@
use OCP\IL10N;

class BundleFetcher {
/** @var IL10N */
private $l10n;
private IL10N $l10n;

/**
* @param IL10N $l10n
*/
public function __construct(IL10N $l10n) {
$this->l10n = $l10n;
}

/**
* @return Bundle[]
*/
public function getBundles() {
public function getBundles(): array {
return [
new EnterpriseBundle($this->l10n),
new HubBundle($this->l10n),
Expand All @@ -50,31 +46,15 @@ public function getBundles() {
];
}

/**
* Bundles that should be installed by default after installation
*
* @return Bundle[]
*/
public function getDefaultInstallationBundle() {
return [
new CoreBundle($this->l10n),
];
}

/**
* Get the bundle with the specified identifier
*
* @param string $identifier
* @return Bundle
* @throws \BadMethodCallException If the bundle does not exist
*/
public function getBundleByIdentifier($identifier) {
/** @var Bundle[] $bundles */
$bundles = array_merge(
$this->getBundles(),
$this->getDefaultInstallationBundle()
);
foreach ($bundles as $bundle) {
public function getBundleByIdentifier(string $identifier): Bundle {
foreach ($this->getBundles() as $bundle) {
if ($bundle->getIdentifier() === $identifier) {
return $bundle;
}
Expand Down
42 changes: 0 additions & 42 deletions lib/private/App/AppStore/Bundles/CoreBundle.php

This file was deleted.

7 changes: 0 additions & 7 deletions lib/private/Repair.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
use OCP\EventDispatcher\IEventDispatcher;
use OCP\Migration\IOutput;
use OCP\Migration\IRepairStep;
use OC\App\AppStore\Bundles\BundleFetcher;
use OC\Avatar\AvatarManager;
use OC\DB\Connection;
use OC\DB\ConnectionAdapter;
Expand Down Expand Up @@ -75,7 +74,6 @@
use OC\Repair\OldGroupMembershipShares;
use OC\Repair\Owncloud\CleanPreviews;
use OC\Repair\Owncloud\DropAccountTermsTable;
use OC\Repair\Owncloud\InstallCoreBundle;
use OC\Repair\Owncloud\MigrateOauthTables;
use OC\Repair\Owncloud\MoveAvatars;
use OC\Repair\Owncloud\SaveAccountsTableData;
Expand Down Expand Up @@ -193,11 +191,6 @@ public static function getRepairSteps() {
new MigrateOauthTables(\OC::$server->get(Connection::class)),
new FixMountStorages(\OC::$server->getDatabaseConnection()),
new UpdateLanguageCodes(\OC::$server->getDatabaseConnection(), \OC::$server->getConfig()),
new InstallCoreBundle(
\OC::$server->query(BundleFetcher::class),
\OC::$server->getConfig(),
\OC::$server->query(Installer::class)
),
new AddLogRotateJob(\OC::$server->getJobList()),
new ClearFrontendCaches(\OC::$server->getMemCacheFactory(), \OC::$server->query(JSCombiner::class)),
\OCP\Server::get(ClearGeneratedAvatarCache::class),
Expand Down
79 changes: 0 additions & 79 deletions lib/private/Repair/Owncloud/InstallCoreBundle.php

This file was deleted.

8 changes: 0 additions & 8 deletions lib/private/Setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -403,14 +403,6 @@ public function install($options) {

// Install shipped apps and specified app bundles
Installer::installShippedApps();
$bundleFetcher = new BundleFetcher(\OC::$server->getL10N('lib'));
$defaultInstallationBundles = $bundleFetcher->getDefaultInstallationBundle();
foreach ($defaultInstallationBundles as $bundle) {
try {
$this->installer->installAppBundle($bundle);
} catch (Exception $e) {
}
}

// create empty file in data dir, so we can later find
// out that this is indeed an ownCloud data directory
Expand Down
142 changes: 0 additions & 142 deletions tests/Test/Repair/Owncloud/InstallCoreBundleTest.php

This file was deleted.

Loading

0 comments on commit c6c4328

Please sign in to comment.