Skip to content

Commit

Permalink
Merge pull request #16 from lochmueller/master
Browse files Browse the repository at this point in the history
Decouple excel resource from the TYPO3 extension
  • Loading branch information
sirdiego committed Jan 12, 2018
2 parents 1caf37d + adba218 commit d92063c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Classes/Service/Resources/Excel.php
Expand Up @@ -63,8 +63,8 @@ public function parseResource()
{
$configuration = $this->getConfiguration();

if (!ExtensionManagementUtility::isLoaded('phpexcel_library')) {
throw new \Exception('phpexcel_library is not loaded', 12367812368);
if (!class_exists(\PHPExcel_IOFactory::class)) {
throw new \Exception('PHP Excel is needed! Please install EXT:phpexcel_library (regular mode) or phpoffice/phpexcel (composer mode)', 12367812368);
}

$filename = GeneralUtility::getFileAbsFileName($this->filepath);
Expand Down
3 changes: 3 additions & 0 deletions composer.json
Expand Up @@ -30,6 +30,9 @@
"php": ">=5.5.0",
"typo3/cms-core": "~6.2.0||~7.6.0||~8.6.0||~8.7.0||dev-master"
},
"suggest": {
"phpoffice/phpexcel": "Use Excel files as import resource"
},
"replace": {
"importr": "self.version",
"typo3-ter/importr": "self.version"
Expand Down

0 comments on commit d92063c

Please sign in to comment.