From 5c080af7073659407a4f62fb193f62d6bde2af29 Mon Sep 17 00:00:00 2001 From: Oliver Klee Date: Tue, 3 Dec 2019 15:36:50 +0100 Subject: [PATCH] [FEATURE] Add support for PHP 7.4 Also only run the CI tasks that do not depend on the PHP version (i.e., everything except for the PHP linting and the unit tests) on PHP 7.3 only to avoid problems with PHP 7.4. Also ignore the platform reqs for PHP 7.3 and 7.4 during composer update for the time being. Fixes #819 --- .travis.yml | 44 ++++++++++++++++++++++++++++---------------- CHANGELOG.md | 2 ++ composer.json | 2 +- 3 files changed, 31 insertions(+), 17 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2db6fff2..eb274012 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,10 +3,11 @@ sudo: false language: php php: -- "7.0" -- "7.1" -- "7.2" +#- "7.0" +#- "7.1" +#- "7.2" - "7.3" +- "7.4" cache: directories: @@ -23,13 +24,16 @@ before_install: install: - > - export IGNORE_PLATFORM_REQS="$(composer php:version |grep -q '^7.3' && printf -- --ignore-platform-reqs)"; + export IGNORE_PLATFORM_REQS="$(composer php:version |grep -q '^7\.[34]' && printf -- --ignore-platform-reqs)"; echo; echo "Updating the dependencies"; composer update $IGNORE_PLATFORM_REQS --with-dependencies $DEPENDENCIES; composer show; script: +- > + export IS_PHP_73="$(composer php:version |grep -q '^7\.34')"; + - > echo; echo "Validating the composer.json"; @@ -46,21 +50,29 @@ script: composer ci:tests:unit; - > - echo; - echo "Running PHPMD"; - composer ci:php:md; + if IS_PHP_73; then + echo; + echo "Running PHPMD"; + composer ci:php:md; + fi; - > - echo; - echo "Running Psalm"; - composer ci:php:psalm; + if IS_PHP_73; then + echo; + echo "Running Psalm"; + composer ci:php:psalm; + fi; - > - echo; - echo "Running PHP_CodeSniffer"; - composer ci:php:sniff; + if IS_PHP_73; then + echo; + echo "Running PHP_CodeSniffer"; + composer ci:php:sniff; + fi; - > - echo; - echo "Running PHP-CS-Fixer"; - composer ci:php:fixer; + if IS_PHP_73; then + echo; + echo "Running PHP-CS-Fixer"; + composer ci:php:fixer; + fi; diff --git a/CHANGELOG.md b/CHANGELOG.md index 9f7a1503..c4b2a0df 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ This project adheres to [Semantic Versioning](https://semver.org/). ## x.y.z ### Added +- Add support for PHP 7.4 + ([#821](https://github.com/MyIntervals/emogrifier/pull/821)) - Disable php-cs-fixer Yoda conditions ([#791](https://github.com/MyIntervals/emogrifier/issues/791), [#794](https://github.com/MyIntervals/emogrifier/pull/794)) diff --git a/composer.json b/composer.json index 813835b1..51efcf40 100644 --- a/composer.json +++ b/composer.json @@ -37,7 +37,7 @@ "source": "https://github.com/MyIntervals/emogrifier" }, "require": { - "php": "~7.0.0 || ~7.1.0 || ~7.2.0 || ~7.3.0", + "php": "~7.0 || ~7.1 || ~7.2 || ~7.3 || ~7.4", "ext-dom": "*", "ext-libxml": "*", "symfony/css-selector": "^2.8 || ^3.0 || ^4.0 || ^5.0"