diff --git a/.travis.yml b/.travis.yml index 631cc79..4ee0110 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,16 +3,18 @@ language: php matrix: fast_finish: true include: - - php: 5.6 - env: TYPO3_VERSION=^7.6 - - php: 7.0 - env: TYPO3_VERSION=^7.6 - - php: 7.1 - env: TYPO3_VERSION=^7.6 - php: 7.0 env: TYPO3_VERSION=^8.7 - php: 7.1 env: TYPO3_VERSION=^8.7 + - php: 7.2 + env: TYPO3_VERSION=^8.7 + - php: 7.3 + env: TYPO3_VERSION=^8.7 + - php: 7.2 + env: TYPO3_VERSION=^9.5 + - php: 7.3 + env: TYPO3_VERSION=^9.5 sudo: false @@ -30,10 +32,11 @@ before_install: - composer --version before_script: - - composer require typo3/cms="$TYPO3_VERSION" + - phpenv config-rm xdebug.ini + - composer require typo3/minimal=$TYPO3_VERSION # Restore composer.json - git checkout composer.json - - export TYPO3_PATH_WEB=$PWD/.Build/Web + - export TYPO3_PATH_WEB=$PWD/.Build/public script: - > diff --git a/Classes/Controller/PdfController.php b/Classes/Controller/PdfController.php index 8072732..e980ec9 100644 --- a/Classes/Controller/PdfController.php +++ b/Classes/Controller/PdfController.php @@ -36,15 +36,16 @@ * @package Mittwald * @subpackage Web2Pdf\Controller */ -class PdfController extends ActionController { +class PdfController extends ActionController +{ /** * Method provides link generation * */ - public function generatePdfLinkAction() { + public function generatePdfLinkAction() + { $this->settings['pdfQueryParameter'] = ModuleOptions::QUERY_PARAMETER; $this->view->assign('settings', $this->settings); } - -} \ No newline at end of file +} diff --git a/Classes/View/PdfView.php b/Classes/View/PdfView.php index 3096e66..6794fb5 100644 --- a/Classes/View/PdfView.php +++ b/Classes/View/PdfView.php @@ -180,8 +180,6 @@ protected function getPdfObject() if ($styleSheet == 'print' || $styleSheet == 'screen') { $pdf->CSSselectMedia = $styleSheet; - } else { - unset($pdf->CSSselectMedia); } return $pdf; diff --git a/Configuration/TCA/Overrides/sys_template.php b/Configuration/TCA/Overrides/sys_template.php new file mode 100644 index 0000000..c142ace --- /dev/null +++ b/Configuration/TCA/Overrides/sys_template.php @@ -0,0 +1,8 @@ +=5.6" + "typo3/cms-core": "^8.7 || ^9.5", + "mpdf/mpdf": "^7.1", + "php": ">=7.0" }, "require-dev": { - "phpunit/phpunit": "~4.8.0", - "nimut/testing-framework": "^1.0" + "nimut/testing-framework": "^1.0 || ^2.0 || ^3.0 || ^4.0" }, "autoload": { "psr-4": { @@ -37,27 +36,14 @@ "bin-dir": ".Build/bin" }, "scripts": { - "extension-create-libs": [ - "mkdir -p Libraries/temp", - "[ -f $HOME/.composer/vendor/bin/phar-composer ] || composer global require clue/phar-composer", - "if [ ! -f Libraries/mpdf.phar ]; then cd Libraries/temp && composer require mpdf/mpdf=^7.0 && composer config classmap-authoritative true && composer config prepend-autoloader true && composer dump-autoload -o; fi", - "rm -rf Libraries/temp/vendor/mpdf/mpdf/ttfonts/", - "[ -f Libraries/mpdf.phar ] || $HOME/.composer/vendor/bin/phar-composer build Libraries/temp/ Libraries/mpdf.phar", - "chmod -x Libraries/*.phar", - "rm -rf Libraries/temp" - ], - "extension-build": [ - "@extension-create-libs" - ], "extension-release": [ - "@extension-build", "rm -rf Tests/", "rm .gitignore", "rm .travis.yml" ], "post-autoload-dump": [ - "mkdir -p .Build/Web/typo3conf/ext/", - "[ -L .Build/Web/typo3conf/ext/web2pdf ] || ln -snvf ../../../../. .Build/Web/typo3conf/ext/web2pdf" + "mkdir -p .Build/public/typo3conf/ext/", + "[ -L .Build/public/typo3conf/ext/web2pdf ] || ln -snvf ../../../../. .Build/public/typo3conf/ext/web2pdf" ] }, "extra": { @@ -66,7 +52,7 @@ }, "typo3/cms": { "cms-package-dir": "{$vendor-dir}/typo3/cms", - "web-dir": ".Build/Web" + "web-dir": ".Build/public" } } } diff --git a/ext_emconf.php b/ext_emconf.php index fde7634..62a6585 100644 --- a/ext_emconf.php +++ b/ext_emconf.php @@ -37,10 +37,10 @@ 'version' => '1.2-dev', 'constraints' => array( 'depends' => array( - 'typo3' => '7.6.0-8.7.99', - 'extbase' => '7.6.0-8.7.99', - 'fluid' => '7.6.0-8.7.99', - 'php' => '5.6.0-7.2.99', + 'typo3' => '8.7.0-9.5.99', + 'extbase' => '8.7.0-9.5.99', + 'fluid' => '8.7.0-9.5.99', + 'php' => '7.0.0-7.3.99', ), ), 'autoload' => array( diff --git a/ext_localconf.php b/ext_localconf.php index 639e464..d1133bf 100644 --- a/ext_localconf.php +++ b/ext_localconf.php @@ -28,10 +28,6 @@ die ('Access denied.'); } -if (!class_exists(\Mpdf\Mpdf::class)) { - include 'phar://' . \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('web2pdf') . 'Libraries/mpdf.phar/vendor/autoload.php'; -} - TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( 'Mittwald.' . $_EXTKEY, 'Pi1', diff --git a/ext_tables.php b/ext_tables.php deleted file mode 100644 index 3a88925..0000000 --- a/ext_tables.php +++ /dev/null @@ -1,36 +0,0 @@ - - * - * All rights reserved - * - * This script is part of the TYPO3 project. The TYPO3 project is - * free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * The GNU General Public License can be found at - * http://www.gnu.org/copyleft/gpl.html. - * - * This script is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * This copyright notice MUST APPEAR in all copies of the script! - * ************************************************************* */ - -if (!defined('TYPO3_MODE')) { - die ('Access denied.'); -} - -\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( - $_EXTKEY, - 'Pi1', - 'Web2PDF Generator' -); - -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile($_EXTKEY, 'Configuration/TypoScript', 'Web2PDF Generator'); \ No newline at end of file