Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Add support for PHP 7.4 #821

Merged
merged 1 commit into from
Dec 26, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 35 additions & 13 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ php:
- "7.1"
- "7.2"
- "7.3"
- "7.4"

cache:
directories:
Expand All @@ -23,13 +24,18 @@ 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:
- >
is_php_73() {
composer php:version | grep -q '^7\.3';
};

- >
echo;
echo "Validating the composer.json";
Expand All @@ -46,21 +52,37 @@ 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;
else
echo "Skipping PHPMD (will only be run on PHP 7.3).";
fi;

- >
echo;
echo "Running Psalm";
composer ci:php:psalm;
if is_php_73; then
echo;
echo "Running Psalm";
composer ci:php:psalm;
else
echo "Skipping Psalm (will only be run on PHP 7.3).";
fi;

- >
echo;
echo "Running PHP_CodeSniffer";
composer ci:php:sniff;
if is_php_73; then
echo;
echo "Running PHP_CodeSniffer";
composer ci:php:sniff;
else
echo "Skipping PHP_CodeSniffer (will only be run on PHP 7.3).";
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;
else
echo "Skipping PHP-CS-Fixer (will only be run on PHP 7.3).";
fi;
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down