Skip to content

Commit

Permalink
Merge pull request #103 from discoverygarden/fix/d10-27
Browse files Browse the repository at this point in the history
D10-27: Allow wider openspout.
  • Loading branch information
nchiasson-dgi authored Nov 1, 2023
2 parents 17510cb + a514ab2 commit f6768f4
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"type": "drupal-module",
"license": "GPL-3.0-only",
"require": {
"openspout/openspout": "^3",
"openspout/openspout": "^3.4 || ^4",
"discoverygarden/dgi_migrate": "^1 || ^2 || ^3",
"drupal/migrate_plus": "^4.2 || ^5.1 || ^6",
"phpoffice/phpspreadsheet": "^1"
Expand Down
8 changes: 8 additions & 0 deletions src/Commands/ToolsCommands.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,21 @@ class ToolsCommands extends DrushCommands {
*/
protected $cacheKey;

/**
* The entity field manager service.
*
* @var \Drupal\Core\Entity\EntityFieldManagerInterface
*/
protected EntityFieldManagerInterface $entityFieldManager;

/**
* Constructor.
*
* @param \Drupal\Core\Entity\EntityFieldManagerInterface $entity_field_manager
* The entity field manager service.
*/
public function __construct(EntityFieldManagerInterface $entity_field_manager) {
parent::__construct();
$this->entityFieldManager = $entity_field_manager;
}

Expand Down
2 changes: 1 addition & 1 deletion src/Plugin/migrate/process/SubDelimitedExplode.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ class SubDelimitedExplode extends ProcessPluginBase {
*
* @var string
*/
protected $sublimiter;
protected $subdelimiter;

/**
* Indicate if each top-level element should have its space trimmed.
Expand Down
4 changes: 2 additions & 2 deletions src/Plugin/migrate/source/Spreadsheet.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
use Drupal\Core\File\FileSystemInterface;
use Drupal\Core\Plugin\ContainerFactoryPluginInterface;

use OpenSpout\Reader\Common\Creator\ReaderEntityFactory;
use OpenSpout\Reader\Common\Creator\ReaderFactory;
use OpenSpout\Reader\CSV\Reader as CSVReader;
use OpenSpout\Reader\ReaderInterface;
use OpenSpout\Reader\SheetInterface;
Expand Down Expand Up @@ -210,7 +210,7 @@ protected function openReader() {
if ($this->reader === NULL) {
$path = $this->getConfiguration()['file'];
$realpath = $this->fileSystem->realpath($path);
$reader = ReaderEntityFactory::createReaderFromFile($realpath);
$reader = ReaderFactory::createFromFile($realpath);
$reader->open($realpath);
$this->reader = $reader;
}
Expand Down

0 comments on commit f6768f4

Please sign in to comment.