From 75c75a52d3eaa7bcc2ca68e298df707573d04a0e Mon Sep 17 00:00:00 2001 From: Benjamin Kott Date: Fri, 3 May 2019 22:29:25 +0200 Subject: [PATCH] [TASK] Make 10.0.x compatible with TYPO3 9.5.x --- .travis.yml | 44 +++++++++++++++++++++++++--------------- README.md | 14 ++++++------- composer.json | 33 +++++++++++++++--------------- ext_emconf.php | 2 +- ext_typoscript_setup.txt | 25 +++++++++++++++++++++++ 5 files changed, 77 insertions(+), 41 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0e5c162e..1a1b520e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,11 +1,20 @@ language: php -php: - - 7.2 -env: - - UNIT_TESTS=yes - - PHP_LINT=yes - - PHP_CS_FIXER=yes +matrix: + fast_finish: true + include: + - + php: 7.2 + env: TYPO3_CORE=^9 TESTING_FRAMEWORK=^4 PHP_LINT=1 PHP_CS_FIXER=1 + - + php: 7.3 + env: TYPO3_CORE=^9 TESTING_FRAMEWORK=^4 PHP_LINT=1 PHP_CS_FIXER=0 + - + php: 7.2 + env: TYPO3_CORE=10.0.*@dev TESTING_FRAMEWORK=^5 PHP_LINT=0 PHP_CS_FIXER=0 + - + php: 7.3 + env: TYPO3_CORE=10.0.*@dev TESTING_FRAMEWORK=^5 PHP_LINT=0 PHP_CS_FIXER=0 sudo: false @@ -18,28 +27,31 @@ cache: directories: - $HOME/.composer/cache +before_install: + - composer self-update + - composer --version + before_script: - mkdir -p logs - rm -rf .build/ - - composer install --no-interaction --no-progress + - composer require "typo3/cms-core:${TYPO3_CORE}" + - composer require "typo3/testing-framework:${TESTING_FRAMEWORK}" + - git checkout composer.json script: - > - if [[ "$PHP_LINT" == "yes" ]]; then + if [[ "$PHP_LINT" == "1" ]]; then echo; echo "PHP lint"; find . -name \*.php ! -path "./.build/*" | parallel --gnu php -d display_errors=stderr -l {} > /dev/null \; fi - > - if [[ "$PHP_CS_FIXER" == "yes" ]]; then + if [[ "$PHP_CS_FIXER" == "1" ]]; then echo; echo "PHP CS Fixer"; - ./.build/bin/php-cs-fixer fix --format=junit > logs/php-cs-fixer.xml + ./.build/bin/php-cs-fixer fix --dry-run --verbose --diff fi - - > - if [[ "$UNIT_TESTS" == "yes" ]]; then - echo; - echo "Unit tests"; - .build/vendor/phpunit/phpunit/phpunit -c Build/UnitTests.xml --log-junit logs/phpunit.xml --coverage-clover logs/coverage.xml --coverage-html logs/coverage/ - fi + echo; + echo "Unit tests"; + .build/vendor/phpunit/phpunit/phpunit -c Build/UnitTests.xml diff --git a/README.md b/README.md index a181761f..a6b960bf 100644 --- a/README.md +++ b/README.md @@ -6,13 +6,13 @@ This blog extension uses TYPO3s core concepts and elements to provide a full-blo ## Requirements -| Version | TYPO3 | PHP | -|----------|-------------|----------| -| master | 10.0.*@dev | ^7.2 | -| v9.1.x | ^9.5.1 | ^7.2 | -| v9.0.x | ^9.5.1 | ^7.2 | -| v8.7.x | ^8.7.0 | >=7.0.0 | -| v7.6.x | ^7.6.0 | >=5.5.0 | +| Version | TYPO3 | PHP | +|----------|-----------------------|----------| +| master | ^9.5.5 or 10.0.*@dev | ^7.2 | +| v9.1.x | ^9.5.1 | ^7.2 | +| v9.0.x | ^9.5.1 | ^7.2 | +| v8.7.x | ^8.7.0 | >=7.0.0 | +| v7.6.x | ^7.6.0 | >=5.5.0 | ## License GPL-2.0-or-later diff --git a/composer.json b/composer.json index 637361ce..b8d18873 100644 --- a/composer.json +++ b/composer.json @@ -69,25 +69,24 @@ "php": "^7.2", "ext-json": "*", "ext-pdo": "*", - "psr/http-message": "^1.0.0", - "symfony/console": "^4.1", - "typo3/cms-backend": "10.0.*@dev", - "typo3/cms-core": "10.0.*@dev", - "typo3/cms-extbase": "10.0.*@dev", - "typo3/cms-extensionmanager": "10.0.*@dev", - "typo3/cms-fluid": "10.0.*@dev", - "typo3/cms-frontend": "10.0.*@dev", - "typo3/cms-install": "10.0.*@dev", - "typo3fluid/fluid": "^2.6.0" + "psr/http-message": "^1.0", + "typo3/cms-backend": "^9.5.5 || 10.0.*@dev", + "typo3/cms-core": "^9.5.5 || 10.0.*@dev", + "typo3/cms-extbase": "^9.5.5 || 10.0.*@dev", + "typo3/cms-extensionmanager": "^9.5.5 || 10.0.*@dev", + "typo3/cms-fluid": "^9.5.5 || 10.0.*@dev", + "typo3/cms-frontend": "^9.5.5 || 10.0.*@dev", + "typo3/cms-install": "^9.5.5 || 10.0.*@dev", + "typo3fluid/fluid": "^2.6" }, "require-dev": { - "typo3/cms-filelist": "10.0.*@dev", - "typo3/cms-lowlevel": "10.0.*@dev", - "typo3/cms-tstemplate": "10.0.*@dev", - "friendsofphp/php-cs-fixer": "^2.14.0", + "typo3/cms-filelist": "^9.5.5 || 10.0.*@dev", + "typo3/cms-lowlevel": "^9.5.5 || 10.0.*@dev", + "typo3/cms-tstemplate": "^9.5.5 || 10.0.*@dev", + "friendsofphp/php-cs-fixer": "^2.14", "roave/security-advisories": "dev-master", - "t3g/blog-template-test": "^1.0.0", - "typo3/testing-framework": "^5.0.0", - "bk2k/extension-helper": "^1.0.2" + "t3g/blog-template-test": "^1.0", + "typo3/testing-framework": "^4.9 || ^5.0", + "bk2k/extension-helper": "^1.0" } } diff --git a/ext_emconf.php b/ext_emconf.php index cbab80f3..60e5d1dd 100644 --- a/ext_emconf.php +++ b/ext_emconf.php @@ -20,7 +20,7 @@ 'version' => '10.0.0-dev', 'constraints' => [ 'depends' => [ - 'typo3' => '10.0.0-10.99.99', + 'typo3' => '9.5.5-10.0.99', ], 'conflicts' => [], 'suggests' => [], diff --git a/ext_typoscript_setup.txt b/ext_typoscript_setup.txt index 89aaf5a3..aea07bf9 100644 --- a/ext_typoscript_setup.txt +++ b/ext_typoscript_setup.txt @@ -6,14 +6,39 @@ plugin.tx_blog { config.tx_extbase.persistence { classes { + T3G\AgencyPack\Blog\Domain\Model\Content { + mapping { + tableName = tt_content + } + } + T3G\AgencyPack\Blog\Domain\Model\Post { + mapping { + tableName = pages + } + } + T3G\AgencyPack\Blog\Domain\Model\Category { + mapping { + tableName = sys_category + } + } T3G\AgencyPack\Blog\Domain\Model\Comment { newRecordStoragePid = {$plugin.tx_blog.settings.storagePid} + mapping { + tableName = tx_blog_domain_model_comment + columns.parentid.mapOnProperty = post + } } T3G\AgencyPack\Blog\Domain\Model\Tag { newRecordStoragePid = {$plugin.tx_blog.settings.storagePid} + mapping { + tableName = tx_blog_domain_model_tag + } } T3G\AgencyPack\Blog\Domain\Model\Author { newRecordStoragePid = {$plugin.tx_blog.settings.storagePid} + mapping { + tableName = tx_blog_domain_model_author + } } } }