Skip to content

Commit

Permalink
Merge pull request #302 from ptondereau/php8
Browse files Browse the repository at this point in the history
Add PHP8 support.
  • Loading branch information
beberlei authored Nov 12, 2020
2 parents af6676a + 5c4dd23 commit c61e82d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
13 changes: 9 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ matrix:
- php: 7.1
- php: 7.2
- php: 7.3
- php: 7.3.0
- php: 7.3.1
- php: 7.3.2
- php: 7.4
- php: nightly
env:
- IGNORE_PLATFORM_REQ=true
- php: hhvm-3.9
sudo: required
dist: trusty
Expand All @@ -36,7 +36,12 @@ before_install:
- xdebug-disable

before_script:
- travis_retry composer update --no-interaction --prefer-source --prefer-stable
- if [[ "$IGNORE_PLATFORM_REQ" == "true" ]]; then
composer self-update --preview;
travis_retry composer update --no-interaction --prefer-stable --ignore-platform-req=php;
else
travis_retry composer update --no-interaction --prefer-stable;
fi

script:
- if [[ "$LINT" == "true" ]]; then
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"sort-packages": true
},
"require": {
"php": "^7",
"php": "^7.0 || ^8.0",
"ext-intl": "*",
"ext-simplexml": "*",
"ext-mbstring": "*",
Expand Down
6 changes: 4 additions & 2 deletions tests/Assert/Tests/AssertTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

use Assert\Assertion;
use Assert\AssertionFailedException;
use Assert\Tests\Fixtures\CustomAssertion;
use Assert\Tests\Fixtures\OneCountable;
use PDO;
use PHPUnit\Framework\TestCase;
Expand Down Expand Up @@ -1832,7 +1833,8 @@ public function testValidCallable()
{
$this->assertTrue(Assertion::isCallable('\is_callable'));
$this->assertTrue(Assertion::isCallable(__NAMESPACE__.'\\Fixtures\\someCallable'));
$this->assertTrue(Assertion::isCallable([OneCountable::class, 'count']));
$this->assertTrue(Assertion::isCallable([new OneCountable(), 'count']));
$this->assertTrue(Assertion::isCallable([CustomAssertion::class, 'clearCalls']));
$this->assertTrue(
Assertion::isCallable(
function () {
Expand Down Expand Up @@ -2227,7 +2229,7 @@ public function testInvalidPropertiesExist($properties)

public function testIsResource()
{
self::assertTrue(Assertion::isResource(\curl_init()));
self::assertTrue(Assertion::isResource(\fopen('php://memory', 'w')));
}

/**
Expand Down

0 comments on commit c61e82d

Please sign in to comment.