Skip to content

Commit

Permalink
Merge pull request #103 from mittwald/develop
Browse files Browse the repository at this point in the history
Add 9.5 support
  • Loading branch information
pstranghoener authored Mar 18, 2019
2 parents 22058b8 + 09f4d3d commit 2c4dc7e
Show file tree
Hide file tree
Showing 11 changed files with 47 additions and 82 deletions.
19 changes: 11 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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:
- >
Expand Down
9 changes: 5 additions & 4 deletions Classes/Controller/PdfController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

}
}
2 changes: 0 additions & 2 deletions Classes/View/PdfView.php
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,6 @@ protected function getPdfObject()

if ($styleSheet == 'print' || $styleSheet == 'screen') {
$pdf->CSSselectMedia = $styleSheet;
} else {
unset($pdf->CSSselectMedia);
}

return $pdf;
Expand Down
8 changes: 8 additions & 0 deletions Configuration/TCA/Overrides/sys_template.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php
(function () {
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile(
'web2pdf',
'Configuration/TypoScript',
'Web2PDF Generator'
);
})();
10 changes: 10 additions & 0 deletions Configuration/TCA/Overrides/tt_content.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php


(function () {
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
'web2pdf',
'Pi1',
'Web2PDF Generator'
);
})();
3 changes: 1 addition & 2 deletions Tests/Unit/Utility/FilenameUtilityTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@
namespace Mittwald\Tests\Utility;

use Mittwald\Web2pdf\Utility\FilenameUtility;
use TYPO3\CMS\Core\Charset\CharsetConverter;
use TYPO3\CMS\Core\Tests\UnitTestCase;
use Nimut\TestingFramework\TestCase\UnitTestCase;


/**
Expand Down
2 changes: 1 addition & 1 deletion Tests/Unit/Utility/PdfLinkUtilityTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
namespace Mittwald\Tests\Utility;

use Mittwald\Web2pdf\Utility\PdfLinkUtility;
use TYPO3\CMS\Core\Tests\UnitTestCase;
use Nimut\TestingFramework\TestCase\UnitTestCase;


/**
Expand Down
28 changes: 7 additions & 21 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,12 @@
"prefer-stable": true,
"type": "typo3-cms-extension",
"require": {
"typo3/cms-core": "^7.6 || ^8.7",
"mpdf/mpdf": "^7.0",
"php": ">=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": {
Expand All @@ -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": {
Expand All @@ -66,7 +52,7 @@
},
"typo3/cms": {
"cms-package-dir": "{$vendor-dir}/typo3/cms",
"web-dir": ".Build/Web"
"web-dir": ".Build/public"
}
}
}
8 changes: 4 additions & 4 deletions ext_emconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
4 changes: 0 additions & 4 deletions ext_localconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
36 changes: 0 additions & 36 deletions ext_tables.php

This file was deleted.

0 comments on commit 2c4dc7e

Please sign in to comment.