diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7a9d10e..fe73d5a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,8 +15,8 @@ jobs: strategy: fail-fast: true matrix: - php: [7.2, 7.3, 7.4] - symfony: [4.4.*, 5.0.*, 5.1.*] + php: [7.2, 7.3, 7.4, 8.0] + symfony: [4.4.*, 5.1.*] steps: - name: Checkout code diff --git a/composer.json b/composer.json index 3b5a3d4..94f5ac4 100644 --- a/composer.json +++ b/composer.json @@ -12,7 +12,7 @@ } ], "require": { - "php": "^7.2", + "php": ">=7.2", "dragonmantank/cron-expression": "^2.3", "symfony/console": "^3.4|^4.0|^5.0", "symfony/dependency-injection": "^3.4|^4.0|^5.0", @@ -28,7 +28,7 @@ "symfony/lock": "^4.4|^5.0", "symfony/mailer": "^4.4|^5.0", "symfony/messenger": "^4.4|^5.0", - "symfony/phpunit-bridge": "^5.0", + "symfony/phpunit-bridge": "^5.1.8", "symfony/process": "^4.2|^5.0" }, "suggest": { diff --git a/tests/Schedule/Task/CallbackTaskTest.php b/tests/Schedule/Task/CallbackTaskTest.php index 4ce635e..cb98080 100644 --- a/tests/Schedule/Task/CallbackTaskTest.php +++ b/tests/Schedule/Task/CallbackTaskTest.php @@ -15,10 +15,10 @@ final class CallbackTaskTest extends TestCase */ public function has_default_description() { - $this->assertRegExp('#^\(callable\) Zenstruck\\\\ScheduleBundle\\\\Tests\\\\Schedule\\\\Task\\\\CallbackTaskTest\:\d+$#', (new CallbackTask(function() {}))->getDescription()); - $this->assertRegExp('#^\(callable\) Zenstruck\\\\ScheduleBundle\\\\Tests\\\\Schedule\\\\Task\\\\CallbackTaskTest\:\d+$#', (new CallbackTask([$this, __METHOD__]))->getDescription()); - $this->assertRegExp('#^\(callable\) Zenstruck\\\\ScheduleBundle\\\\Tests\\\\Schedule\\\\Task\\\\FixtureForCallbackTaskTest\:\d+$#', (new CallbackTask(new FixtureForCallbackTaskTest()))->getDescription()); - $this->assertRegExp('#^\(callable\) Zenstruck\\\\ScheduleBundle\\\\Tests\\\\Schedule\\\\Task\\\\FixtureForCallbackTaskTest\:\d+$#', (new CallbackTask([FixtureForCallbackTaskTest::class, 'staticMethod']))->getDescription()); + $this->assertMatchesRegularExpression('#^\(callable\) Zenstruck\\\\ScheduleBundle\\\\Tests\\\\Schedule\\\\Task\\\\CallbackTaskTest\:\d+$#', (new CallbackTask(function() {}))->getDescription()); + $this->assertMatchesRegularExpression('#^\(callable\) Zenstruck\\\\ScheduleBundle\\\\Tests\\\\Schedule\\\\Task\\\\CallbackTaskTest\:\d+$#', (new CallbackTask([$this, __METHOD__]))->getDescription()); + $this->assertMatchesRegularExpression('#^\(callable\) Zenstruck\\\\ScheduleBundle\\\\Tests\\\\Schedule\\\\Task\\\\FixtureForCallbackTaskTest\:\d+$#', (new CallbackTask(new FixtureForCallbackTaskTest()))->getDescription()); + $this->assertMatchesRegularExpression('#^\(callable\) Zenstruck\\\\ScheduleBundle\\\\Tests\\\\Schedule\\\\Task\\\\FixtureForCallbackTaskTest\:\d+$#', (new CallbackTask([FixtureForCallbackTaskTest::class, 'staticMethod']))->getDescription()); $this->assertSame('(callable) '.__NAMESPACE__.'\callback_task_test_function', (new CallbackTask(__NAMESPACE__.'\callback_task_test_function'))->getDescription()); } @@ -27,7 +27,7 @@ public function has_default_description() */ public function task_has_context() { - $this->assertRegExp('#Zenstruck\\\\ScheduleBundle\\\\Tests\\\\Schedule\\\\Task\\\\CallbackTaskTest\:\d+$#', (new CallbackTask(function() {}))->getContext()['Callable']); + $this->assertMatchesRegularExpression('#Zenstruck\\\\ScheduleBundle\\\\Tests\\\\Schedule\\\\Task\\\\CallbackTaskTest\:\d+$#', (new CallbackTask(function() {}))->getContext()['Callable']); } }