diff --git a/.travis.yml b/.travis.yml index 5ed27f0..74ccd1f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,6 +5,9 @@ sudo: false php: - 7.2 - 7.3 + - 7.4 + - 8.0 + - 8.1 matrix: fast_finish: true diff --git a/composer.json b/composer.json index 5f84391..a017ee2 100644 --- a/composer.json +++ b/composer.json @@ -5,18 +5,18 @@ "license": "MIT", "bin": ["bin/rusty"], "require": { - "php": "^7.2", + "php": "^7.2|^8.0", - "symfony/process": "^4.4|^5.0", - "symfony/console": "^4.4|^5.0", - "symfony/finder": "^4.4|^5.0", + "symfony/process": "^4.4|^5.0|^6.0", + "symfony/console": "^4.4|^5.0|^6.0", + "symfony/finder": "^4.4|^5.0|^6.0", - "nikic/php-parser": "^3.0", - "league/commonmark": "^0.18,>=0.18.3", + "nikic/php-parser": "^3.0|*4.0", + "league/commonmark": "^0.19|^1.0", "gregwar/rst": "^1.0" }, "require-dev": { - "phpunit/phpunit": "^7.0", + "phpunit/phpunit": "^7.0|^8.5|^9.5", "mikey179/vfsstream": "^1.6" }, "autoload": { diff --git a/tests/CodeSampleCompilerTest.php b/tests/CodeSampleCompilerTest.php index 05e142b..bb58639 100644 --- a/tests/CodeSampleCompilerTest.php +++ b/tests/CodeSampleCompilerTest.php @@ -19,6 +19,14 @@ public function testItTransformsAssertCalls() require_once "/dir/file.php"; \Rusty\Runtime\Asserter::assert('assert(42 === 42);', 42 === 42); CODE; + if (PHP_MAJOR_VERSION > 7) { + $expectedCode = <<expectException(\Rusty\Lint\Exception\SyntaxError::class); /** @var \SplFileInfo $splFileInfoMock */ $splFileInfoMock = $this->createMock(\SplFileInfo::class); $sample = new CodeSample($splFileInfoMock, 42, $code);