Skip to content

Commit

Permalink
Decouple excel resource from the TYPO3 extension, so the PHP lib coul…
Browse files Browse the repository at this point in the history
…d also installed via composer
  • Loading branch information
lochmueller committed Jan 12, 2018
1 parent 1caf37d commit adba218
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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 adba218

Please sign in to comment.