Skip to content

Commit

Permalink
Merge pull request #198 from driesvints/php8
Browse files Browse the repository at this point in the history
Allow PHP 8 installs
  • Loading branch information
tijsverkoyen authored Jul 13, 2020
2 parents b9c2ce7 + 1004f14 commit f435d36
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 9 deletions.
11 changes: 7 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,17 @@ matrix:
dist: bionic
- php: 7.4
dist: bionic
- php: nightly
dist: bionic

install:
- if [[ $setup = 'basic' ]]; then travis_retry composer install --prefer-dist --no-interaction; fi
- if [[ $setup = 'lowest' ]]; then travis_retry composer update --prefer-dist --no-interaction --prefer-lowest --prefer-stable; fi
- if [[ $setup = 'basic' && "$TRAVIS_PHP_VERSION" != "nightly" ]]; then travis_retry composer install --prefer-dist --no-interaction; fi
- if [[ $setup = 'lowest' && "$TRAVIS_PHP_VERSION" != "nightly" ]]; then travis_retry composer update --prefer-dist --no-interaction --prefer-lowest --prefer-stable; fi
- if [[ "$TRAVIS_PHP_VERSION" = "nightly" ]]; then travis_retry composer install --prefer-dist --no-interaction --ignore-platform-reqs; fi

script:
- vendor/bin/phpunit --verbose --coverage-clover=coverage.clover

after_success:
- if [[ "$TRAVIS_PHP_VERSION" != "hhvm" ]]; then wget https://scrutinizer-ci.com/ocular.phar; fi
- if [[ "$TRAVIS_PHP_VERSION" != "hhvm" ]]; then php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi
- if [[ "$TRAVIS_PHP_VERSION" != "nightly" ]]; then wget https://scrutinizer-ci.com/ocular.phar; fi
- if [[ "$TRAVIS_PHP_VERSION" != "nightly" ]]; then php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
}
],
"require": {
"php": "^5.5 || ^7.0",
"php": "^5.5 || ^7.0 || ^8.0",
"ext-dom": "*",
"ext-libxml": "*",
"symfony/css-selector": "^2.7 || ^3.0 || ^4.0 || ^5.0"
},
"require-dev": {
"phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0"
"phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0 || ^7.5"
},
"autoload": {
"psr-4": {
Expand Down
1 change: 0 additions & 1 deletion phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
syntaxCheck="false"
>
<testsuites>
<testsuite name="CssToInlineStyles Tests">
Expand Down
10 changes: 8 additions & 2 deletions tests/CssToInlineStylesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,18 @@ class CssToInlineStylesTest extends TestCase
*/
protected $cssToInlineStyles;

public function setUp()
/**
* @before
*/
protected function prepare()
{
$this->cssToInlineStyles = new CssToInlineStyles();
}

public function tearDown()
/**
* @after
*/
protected function clear()
{
$this->cssToInlineStyles = null;
}
Expand Down

0 comments on commit f435d36

Please sign in to comment.