- 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
This commit is contained in:
Max Böhme 2022-02-26 11:11:39 +01:00
parent d6432d732a
commit 5b8c54806c
2 changed files with 14 additions and 12 deletions

View file

@ -12,18 +12,19 @@
} }
], ],
"require": { "require": {
"php": "^7.2 | ^8.0", "php": "^8.0",
"monolog/monolog": "~1.11 | ^2.0", "monolog/monolog": "~1.11 | ^2.0",
"symfony/console": "^4.0 | ^5.0", "symfony/console": "^4.0 | ^5.0 | ^6.0",
"symfony/filesystem": "^4.0 | ^5.0", "symfony/filesystem": "^4.0 | ^5.0 | ^6.0",
"symfony/event-dispatcher": "^4.0 | ^5.0", "symfony/event-dispatcher": "^4.0 | ^5.0 | ^6.0",
"symfony/finder": "^4.0 | ^5.0", "symfony/finder": "^4.0 | ^5.0 | ^6.0",
"symfony/yaml": "^4.0 | ^5.0", "symfony/yaml": "^4.0 | ^5.0 | ^6.0",
"symfony/process": "^4.0 | ^5.0" "symfony/process": "^4.0 | ^5.0 | ^6.0"
}, },
"require-dev": { "require-dev": {
"phpunit/phpunit": "^8.0", "phpunit/phpunit": "^8.0",
"php-coveralls/php-coveralls": "~2.0" "php-coveralls/php-coveralls": "~2.0",
"symfony/phpunit-bridge": "^6.0"
}, },
"suggest": { "suggest": {
"ext-posix": "*" "ext-posix": "*"

View file

@ -24,9 +24,10 @@ class ProcessMockup extends Process
$this->commandline = $commandline; $this->commandline = $commandline;
} }
public function setTimeout($timeout) public function setTimeout(?float $timeout): static
{ {
$this->timeout = $timeout; $this->timeout = $timeout;
return $this;
} }
public function run(callable $callback = null, array $env = array()): int public function run(callable $callback = null, array $env = array()): int
@ -58,17 +59,17 @@ class ProcessMockup extends Process
return 0; return 0;
} }
public function isSuccessful() public function isSuccessful(): bool
{ {
return $this->success; return $this->success;
} }
public function getErrorOutput() public function getErrorOutput(): string
{ {
return ''; return '';
} }
public function getOutput() public function getOutput(): string
{ {
if ($this->commandline == 'git branch | grep "*"') { if ($this->commandline == 'git branch | grep "*"') {
return '* master'; return '* master';