From b2cbe9509730a7ec9aeac7232f5326569a329bc1 Mon Sep 17 00:00:00 2001 From: Henrique Ramos Date: Tue, 1 Feb 2022 19:24:05 -0300 Subject: [PATCH] pkp/pkp-lib#7105 Applying some changes on bad rebased stuff --- Jobs/Submissions/UpdateSubmissionSearchJob.php | 6 +++--- classes/core/PKPContainer.inc.php | 2 -- classes/core/PKPEventServiceProvider.inc.php | 18 +----------------- classes/core/PKPQueueProvider.inc.php | 13 +------------ composer.json | 3 +-- 5 files changed, 6 insertions(+), 36 deletions(-) diff --git a/Jobs/Submissions/UpdateSubmissionSearchJob.php b/Jobs/Submissions/UpdateSubmissionSearchJob.php index 902ceb17162..124c7a4d941 100644 --- a/Jobs/Submissions/UpdateSubmissionSearchJob.php +++ b/Jobs/Submissions/UpdateSubmissionSearchJob.php @@ -3,13 +3,13 @@ declare(strict_types=1); /** - * @file Jobs/Submissions/UpdateSubmissionOnSearchIndexJob.php + * @file Jobs/Submissions/UpdateSubmissionSearchJob.php * * Copyright (c) 2014-2021 Simon Fraser University * Copyright (c) 2000-2021 John Willinsky * Distributed under the GNU GPL v3. For full terms see the file docs/COPYING. * - * @class UpdateSubmissionOnSearchIndexJob + * @class UpdateSubmissionSearchJob * @ingroup jobs * * @brief Class to handle the Submission Search data update as a Job @@ -24,7 +24,7 @@ use PKP\submission\PKPSubmission; use PKP\Support\Jobs\BaseJob; -class UpdateSubmissionOnSearchIndexJob extends BaseJob +class UpdateSubmissionSearchJob extends BaseJob { /** * @var int The submission ID diff --git a/classes/core/PKPContainer.inc.php b/classes/core/PKPContainer.inc.php index b510634f4d3..881c95858e9 100644 --- a/classes/core/PKPContainer.inc.php +++ b/classes/core/PKPContainer.inc.php @@ -22,7 +22,6 @@ use Illuminate\Container\Container; use Illuminate\Contracts\Console\Kernel as KernelContract; -use Illuminate\Contracts\Container\Container as ContainerContract; use Illuminate\Contracts\Debug\ExceptionHandler; use Illuminate\Foundation\Console\Kernel; use Illuminate\Log\LogServiceProvider; @@ -66,7 +65,6 @@ protected function registerBaseBindings() $this->instance('app', $this); $this->instance(Container::class, $this); $this->instance('path', $this->basePath); - $this->instance(ContainerContract::class, $this); $this->singleton(ExceptionHandler::class, function () { return new class() implements ExceptionHandler { public function shouldReport(Throwable $e) diff --git a/classes/core/PKPEventServiceProvider.inc.php b/classes/core/PKPEventServiceProvider.inc.php index 3a9de552885..d7aa9ebb3b2 100644 --- a/classes/core/PKPEventServiceProvider.inc.php +++ b/classes/core/PKPEventServiceProvider.inc.php @@ -31,23 +31,7 @@ class PKPEventServiceProvider extends EventServiceProvider * @var array $listen $event => $listeners[] * @brief Registering events & listeners, see Illuminate\Events\EventServiceProvider */ - protected $listen = [ - SubmissionDeleted::class => [ - SubmissionDeletedListener::class, - ], - SubmissionFileDeleted::class => [ - SubmissionFileDeletedListener::class, - ], - MetadataChanged::class => [ - MetadataChangedListener::class - ], - PublishedEvent::class => [ - SubmissionUpdatedListener::class, - ], - UnpublishedEvent::class => [ - SubmissionUpdatedListener::class, - ] - ]; + protected $listen = []; /** * @var array diff --git a/classes/core/PKPQueueProvider.inc.php b/classes/core/PKPQueueProvider.inc.php index 22ec1d412c8..84e3932706a 100644 --- a/classes/core/PKPQueueProvider.inc.php +++ b/classes/core/PKPQueueProvider.inc.php @@ -24,7 +24,7 @@ class PKPQueueProvider { - public function runQueuedJobs(): void + public function runJobsAtShutdown(): void { $disableRun = Config::getVar('queues', 'disable_jobs_run_at_shutdown', false); @@ -62,17 +62,6 @@ public function runQueuedJobs(): void ); } - public function runJobsAtShutdown(): void - { - $shouldRun = Config::getVar('queues', 'run_jobs_at_shutdown', false); - - if (!$shouldRun) { - return; - } - - $this->runQueuedJobs(); - } - public function register() { register_shutdown_function([$this, 'runJobsAtShutdown']); diff --git a/composer.json b/composer.json index d9f59f9fa5b..07c9e4c2b21 100644 --- a/composer.json +++ b/composer.json @@ -25,8 +25,7 @@ "staudenmeir/laravel-upsert": "^1.3", "cweagans/composer-patches": "^1.7", "kevinlebrun/colors.php": "^1.0", - "symfony/mailer": "^5.4", - "nesbot/carbon": "~2" + "symfony/mailer": "^5.4" }, "require-dev": { "phpunit/phpunit": "~9",