Skip to content

Commit

Permalink
Merge pull request #924 from nextcloud/chore/drop-25-registration
Browse files Browse the repository at this point in the history
chore: Remove legacy reference provider
  • Loading branch information
blizzz authored Mar 13, 2024
2 parents f6515d6 + 61472fc commit c9faf04
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 85 deletions.
19 changes: 1 addition & 18 deletions lib/AppInfo/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
use OCA\Tables\Listener\LoadAdditionalListener;
use OCA\Tables\Listener\TablesReferenceListener;
use OCA\Tables\Listener\UserDeletedListener;
use OCA\Tables\Reference\ContentReferenceProvider;
use OCA\Tables\Reference\LegacyReferenceProvider;
use OCA\Tables\Reference\ReferenceProvider;
use OCA\Tables\Search\SearchTablesProvider;
use OCP\AppFramework\App;
Expand All @@ -19,12 +17,7 @@
use OCP\AppFramework\Bootstrap\IRegistrationContext;
use OCP\Collaboration\Reference\RenderReferenceEvent;
use OCP\Collaboration\Resources\LoadAdditionalScriptsEvent;
use OCP\IConfig;
use OCP\Server;
use OCP\User\Events\BeforeUserDeletedEvent;
use Psr\Container\ContainerExceptionInterface;

use Psr\Container\NotFoundExceptionInterface;

class Application extends App implements IBootstrap {
public const APP_ID = 'tables';
Expand Down Expand Up @@ -52,17 +45,7 @@ public function register(IRegistrationContext $context): void {

$context->registerSearchProvider(SearchTablesProvider::class);

try {
/** @var IConfig $config */
$config = Server::get(IConfig::class);
if (version_compare($config->getSystemValueString('version', '0.0.0'), '26.0.0', '<')) {
$context->registerReferenceProvider(LegacyReferenceProvider::class);
} else {
$context->registerReferenceProvider(ReferenceProvider::class);
}
$context->registerReferenceProvider(ContentReferenceProvider::class);
} catch (NotFoundExceptionInterface|ContainerExceptionInterface $e) {
}
$context->registerReferenceProvider(ReferenceProvider::class);

$context->registerCapability(Capabilities::class);
}
Expand Down
67 changes: 0 additions & 67 deletions lib/Reference/LegacyReferenceProvider.php

This file was deleted.

0 comments on commit c9faf04

Please sign in to comment.