diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 9515b15..734288b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -17,7 +17,10 @@ jobs: fail-fast: true matrix: php: [8.1, 8.2, 8.3] - laravel: [10] + laravel: [10, 11] + exclude: + - php: 8.1 + laravel: 11 name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} diff --git a/composer.json b/composer.json index 71e771f..114c227 100644 --- a/composer.json +++ b/composer.json @@ -12,21 +12,21 @@ "require": { "php": "^8.1", "ext-dom": "*", - "illuminate/contracts": "^10.0", - "illuminate/database": "^10.0", - "illuminate/http": "^10.0", - "illuminate/support": "^10.0", - "illuminate/testing": "^10.0", + "illuminate/contracts": "^10.0|^11.0", + "illuminate/database": "^10.0|^11.0", + "illuminate/http": "^10.0|^11.0", + "illuminate/support": "^10.0|^11.0", + "illuminate/testing": "^10.0|^11.0", "mockery/mockery": "^1.0", "phpunit/phpunit": "^10.0.7", - "symfony/console": "^6.2", - "symfony/css-selector": "^6.2", - "symfony/dom-crawler": "^6.2", - "symfony/http-foundation": "^6.2", - "symfony/http-kernel": "^6.2" + "symfony/console": "^6.2|^7.0", + "symfony/css-selector": "^6.2|^7.0", + "symfony/dom-crawler": "^6.2|^7.0", + "symfony/http-foundation": "^6.2|^7.0", + "symfony/http-kernel": "^6.2|^7.0" }, "require-dev": { - "laravel/framework": "^10.0" + "laravel/framework": "^10.0|^11.0" }, "autoload": { "psr-4": { diff --git a/tests/Stubs/OutputStub.php b/tests/Stubs/OutputStub.php index 8ceaf56..0b1df6f 100644 --- a/tests/Stubs/OutputStub.php +++ b/tests/Stubs/OutputStub.php @@ -2,62 +2,123 @@ namespace Laravel\BrowserKitTesting\Tests\Stubs; +use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Formatter\OutputFormatterInterface; use Symfony\Component\Console\Output\OutputInterface; +use Traversable; -class OutputStub implements OutputInterface -{ - public function write($messages, $newline = false, $options = 0) +if (property_exists(Command::class, 'defaultName')) { + class OutputStub implements OutputInterface { - } + public function write($messages, $newline = false, $options = 0) + { + } - public function writeln($messages, $options = 0) - { - } + public function writeln($messages, $options = 0) + { + } - public function setVerbosity($level) - { - } + public function setVerbosity($level) + { + } - public function getVerbosity(): int - { - return 1; - } + public function getVerbosity(): int + { + return 1; + } - public function isQuiet(): bool - { - return false; - } + public function isQuiet(): bool + { + return false; + } - public function isVerbose(): bool - { - return false; - } + public function isVerbose(): bool + { + return false; + } - public function isVeryVerbose(): bool - { - return false; - } + public function isVeryVerbose(): bool + { + return false; + } - public function isDebug(): bool - { - return false; - } + public function isDebug(): bool + { + return false; + } - public function setDecorated($decorated) - { - } + public function setDecorated($decorated) + { + } - public function isDecorated(): bool - { - return false; - } + public function isDecorated(): bool + { + return false; + } - public function setFormatter(OutputFormatterInterface $formatter) - { - } + public function setFormatter(OutputFormatterInterface $formatter) + { + } - public function getFormatter(): OutputFormatterInterface + public function getFormatter(): OutputFormatterInterface + { + } + } +} else { + class OutputStub implements OutputInterface { + public function write(Traversable|array|string $messages, bool $newline = false, int $options = 0): void + { + } + + public function writeln(Traversable|array|string $messages, int $options = 0): void + { + } + + public function setVerbosity(int $level): void + { + } + + public function getVerbosity(): int + { + return 1; + } + + public function isQuiet(): bool + { + return false; + } + + public function isVerbose(): bool + { + return false; + } + + public function isVeryVerbose(): bool + { + return false; + } + + public function isDebug(): bool + { + return false; + } + + public function setDecorated(bool $decorated): void + { + } + + public function isDecorated(): bool + { + return false; + } + + public function setFormatter(OutputFormatterInterface $formatter): void + { + } + + public function getFormatter(): OutputFormatterInterface + { + } } }