Commit bb7d1a0e authored by Lisa Harrison's avatar Lisa Harrison Committed by Bojan Živanović
Browse files

#3262956: Address code deprecations and coding standards for Drupal 9.1+

parent 2e73586b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@ name: 'Advanced Queue'
type: module
description: 'Provides a better Queue API.'
package: Other
core_version_requirement: ^8.7.7 || ^9
core_version_requirement: ^9.1
configure: entity.advancedqueue_queue.collection
dependencies:
  - drupal:views
+1 −1
Original line number Diff line number Diff line
@@ -3,7 +3,7 @@
namespace Drupal\advancedqueue\Event;

use Drupal\advancedqueue\Job;
use Symfony\Component\EventDispatcher\Event;
use Drupal\Component\EventDispatcher\Event;

/**
 * Defines the job event.
+1 −1
Original line number Diff line number Diff line
@@ -46,7 +46,7 @@ class JobState extends FieldPluginBase {
  public function render(ResultRow $values) {
    $state = $this->getValue($values);
    $state_options = self::getOptions();
    $label = isset($state_options[$state]) ? $state_options[$state] : $state;
    $label = $state_options[$state] ?? $state;

    if ($this->options['icon']) {
      return [
+2 −3
Original line number Diff line number Diff line
@@ -88,7 +88,7 @@ class Processor implements ProcessorInterface {
   * {@inheritdoc}
   */
  public function processJob(Job $job, QueueInterface $queue) {
    $this->eventDispatcher->dispatch(AdvancedQueueEvents::PRE_PROCESS, new JobEvent($job));
    $this->eventDispatcher->dispatch(new JobEvent($job), AdvancedQueueEvents::PRE_PROCESS);

    try {
      $job_type = $this->jobTypeManager->createInstance($job->getType());
@@ -103,8 +103,7 @@ class Processor implements ProcessorInterface {
    // Update the job with the result.
    $job->setState($result->getState());
    $job->setMessage($result->getMessage());

    $this->eventDispatcher->dispatch(AdvancedQueueEvents::POST_PROCESS, new JobEvent($job));
    $this->eventDispatcher->dispatch(new JobEvent($job), AdvancedQueueEvents::POST_PROCESS);
    // Pass the job back to the backend.
    $queue_backend = $queue->getBackend();
    if ($job->getState() == Job::STATE_SUCCESS) {
+1 −0
Original line number Diff line number Diff line
name: 'Advanced Queue Test'
description: 'Testing module for Advanced Queue'
type: module
package: Testing
dependencies:
Loading