Commit e9f0e397 authored by Florent Torregrosa's avatar Florent Torregrosa Committed by Florent Torregrosa
Browse files

Issue #3258739 by Grimreaper: Drupal 10 compatibility. Fix PHPStan, Fix PHP...

Issue #3258739 by Grimreaper: Drupal 10 compatibility. Fix PHPStan, Fix PHP MND, Fix Composer normalize. Apply PHPCS Fixer.
parent be35f706
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
{
    "name": "drupal/file_extractor",
    "type": "drupal-module",
    "description": "Extract file entity content.",
    "license": "GPL-2.0-or-later",
    "type": "drupal-module",
    "require": {
        "composer-runtime-api": "^2.0"
    },
    "require-dev": {
        "symfony/process": "^3.0 || ^4.0 || ^5.0"
        "symfony/process": ">=3.0"
    },
    "suggest": {
        "symfony/process": "To be able to use some provided extraction plugins."
+2 −2
Original line number Diff line number Diff line
name: 'File Extractor'
type: module
description: 'Extract file entity content.'
core_version_requirement: ^9.2 || ^10
core_version_requirement: ^9.3 || ^10
package: 'File'
configure: file_extractor.settings_form
php: 7.2
php: 7.4
dependencies:
  - drupal:file
+4 −4
Original line number Diff line number Diff line
@@ -84,7 +84,7 @@ function file_extractor_post_update_update_field_formatter_structure_in_entities
    $query->condition($entity_id_key, $sandbox['current_entity_id'], '>');
    $query->sort($entity_id_key, 'ASC');
    // @phpstan-ignore-next-line
    $query->range(0, 25);
    $query->range(0, (int) 25);
    /** @var int[] $entity_ids_to_update */
    $entity_ids_to_update = $query->execute();
    /** @var \Drupal\Core\Entity\ContentEntityInterface[] $entities_to_update */
@@ -103,7 +103,7 @@ function file_extractor_post_update_update_field_formatter_structure_in_entities
        }

        $override_field_value = $layout_builder_override->get(0);
        if (is_null($override_field_value)) {
        if ($override_field_value === NULL) {
          continue;
        }

@@ -136,8 +136,8 @@ function file_extractor_post_update_update_field_formatter_structure_in_entities
      }

      $sandbox['current_entity_id'] = $entity->id();
      $sandbox['count'][$entity_type_id]--;
      $sandbox['progress']++;
      --$sandbox['count'][$entity_type_id];
      ++$sandbox['progress'];
    }

    // If it is the last batch run for this entity type, reset the
+1 −0
Original line number Diff line number Diff line
@@ -37,3 +37,4 @@ services:
    arguments:
      - '@entity_type.manager'
      - '@file_system'
      - '@extension.list.module'
+4 −4
Original line number Diff line number Diff line
@@ -4,8 +4,8 @@ declare(strict_types = 1);

namespace Drupal\file_extractor\Event;

use Drupal\file\FileInterface;
use Drupal\Component\EventDispatcher\Event;
use Drupal\file\FileInterface;

/**
 * Defines an event to decide if a file entity is indexable.
@@ -17,14 +17,14 @@ class FileIndexableEvent extends Event {
   *
   * @var \Drupal\file\FileInterface
   */
  protected $file;
  protected FileInterface $file;

  /**
   * If the file is indexable.
   *
   * @var bool
   */
  protected $indexable = TRUE;
  protected bool $indexable = TRUE;

  /**
   * FileIndexableEvent constructor.
Loading