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

chore: Remove legacy reference provider #924

Merged
merged 1 commit into from
Mar 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.

Loading