diff --git a/.travis.yml b/.travis.yml index f551481d..fe9f2614 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 @@ -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 diff --git a/composer.json b/composer.json index 619b8e27..cc326282 100644 --- a/composer.json +++ b/composer.json @@ -23,7 +23,7 @@ "sort-packages": true }, "require": { - "php": "^7", + "php": "^7.0 || ^8.0", "ext-intl": "*", "ext-simplexml": "*", "ext-mbstring": "*", diff --git a/tests/Assert/Tests/AssertTest.php b/tests/Assert/Tests/AssertTest.php index 8f4d3fea..317ac166 100644 --- a/tests/Assert/Tests/AssertTest.php +++ b/tests/Assert/Tests/AssertTest.php @@ -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; @@ -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 () { @@ -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'))); } /**