Commit dbc02086 authored by Adam Bramley's avatar Adam Bramley Committed by Steven Jones
Browse files

Issue #3459698 by project update bot, steven jones, acbramley, benstallings,...

Issue #3459698 by project update bot, steven jones, acbramley, benstallings, emptyvoid, mably, aaronbauman, maxilein: Automated Drupal 11 compatibility fixes for views_data_export
parent 1f65a7f2
Loading
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -26,3 +26,6 @@ include:
variables:
  # CSpell was picking up too many false positives, so disable.
  SKIP_CSPELL: '1'
  # We want to test in Drupal 10 too.
  OPT_IN_TEST_PREVIOUS_MAJOR: 1
+3 −2
Original line number Diff line number Diff line
@@ -5,6 +5,7 @@ namespace Drupal\views_data_export\Plugin\views\display;
use Drupal\Core\Cache\CacheableMetadata;
use Drupal\Core\Cache\CacheableResponse;
use Drupal\Core\Config\StorageException;
use Drupal\Core\File\FileExists;
use Drupal\Core\File\FileSystemInterface;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Render\BubbleableMetadata;
@@ -746,7 +747,7 @@ class DataExport extends RestExport {
        $fileSystem = \Drupal::service('file_system');
        $fileSystem->prepareDirectory($directory, FileSystemInterface::CREATE_DIRECTORY);
        $destination = $directory . $filename;
        $file = \Drupal::service('file.repository')->writeData('', $destination, FileSystemInterface::EXISTS_REPLACE);
        $file = \Drupal::service('file.repository')->writeData('', $destination, FileExists::Replace);
        if (!$file) {
          // Failed to create the file, abort the batch.
          unset($context['sandbox']);
@@ -835,7 +836,7 @@ class DataExport extends RestExport {
        $rowIndex++;
        $colIndex = 0;
        foreach ($row->getCellIterator() as $cell) {
          $previousExcel->getActiveSheet()->setCellValueByColumnAndRow(++$colIndex, $rowIndex, $cell->getValue());
          $previousExcel->getActiveSheet()->setCellValue([++$colIndex, $rowIndex], $cell->getValue());
        }
      }

+1 −1
Original line number Diff line number Diff line
@@ -2,11 +2,11 @@

namespace Drupal\Tests\views_data_export\Functional;

use Drupal\csv_serialization\Encoder\CsvEncoder;
use Drupal\Tests\node\Traits\ContentTypeCreationTrait;
use Drupal\Tests\node\Traits\NodeCreationTrait;
use Drupal\Tests\search_api\Functional\ExampleContentTrait;
use Drupal\Tests\views\Functional\ViewTestBase;
use Drupal\csv_serialization\Encoder\CsvEncoder;

/**
 * Tests views data export with batch.
+1 −1
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@ name: 'Views Data Export'
type: module
description: 'Plugin to export views data into various file formats.'
package: 'Views'
core_version_requirement: ^9 || ^10
core_version_requirement: ^9 || ^10 || ^11
dependencies:
  - drupal:rest
  - drupal:views