From 5b8c54806c4e6cc01974f46091832e41fcef98bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Max=20B=C3=B6hme?= Date: Sat, 26 Feb 2022 11:11:39 +0100 Subject: [PATCH] - upgraded symfony to version 6 - needed to drop support for php <8.0 because of symfony/process 6 declaring "static" as return type on a method that we overwrite --- composer.json | 17 +++++++++-------- tests/Runtime/ProcessMockup.php | 9 +++++---- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/composer.json b/composer.json index 45fe073..624a77d 100644 --- a/composer.json +++ b/composer.json @@ -12,18 +12,19 @@ } ], "require": { - "php": "^7.2 | ^8.0", + "php": "^8.0", "monolog/monolog": "~1.11 | ^2.0", - "symfony/console": "^4.0 | ^5.0", - "symfony/filesystem": "^4.0 | ^5.0", - "symfony/event-dispatcher": "^4.0 | ^5.0", - "symfony/finder": "^4.0 | ^5.0", - "symfony/yaml": "^4.0 | ^5.0", - "symfony/process": "^4.0 | ^5.0" + "symfony/console": "^4.0 | ^5.0 | ^6.0", + "symfony/filesystem": "^4.0 | ^5.0 | ^6.0", + "symfony/event-dispatcher": "^4.0 | ^5.0 | ^6.0", + "symfony/finder": "^4.0 | ^5.0 | ^6.0", + "symfony/yaml": "^4.0 | ^5.0 | ^6.0", + "symfony/process": "^4.0 | ^5.0 | ^6.0" }, "require-dev": { "phpunit/phpunit": "^8.0", - "php-coveralls/php-coveralls": "~2.0" + "php-coveralls/php-coveralls": "~2.0", + "symfony/phpunit-bridge": "^6.0" }, "suggest": { "ext-posix": "*" diff --git a/tests/Runtime/ProcessMockup.php b/tests/Runtime/ProcessMockup.php index ea6d529..4d638a1 100644 --- a/tests/Runtime/ProcessMockup.php +++ b/tests/Runtime/ProcessMockup.php @@ -24,9 +24,10 @@ class ProcessMockup extends Process $this->commandline = $commandline; } - public function setTimeout($timeout) + public function setTimeout(?float $timeout): static { $this->timeout = $timeout; + return $this; } public function run(callable $callback = null, array $env = array()): int @@ -58,17 +59,17 @@ class ProcessMockup extends Process return 0; } - public function isSuccessful() + public function isSuccessful(): bool { return $this->success; } - public function getErrorOutput() + public function getErrorOutput(): string { return ''; } - public function getOutput() + public function getOutput(): string { if ($this->commandline == 'git branch | grep "*"') { return '* master';