Skip to content

Commit

Permalink
[7.x] Adds L11 support (#172)
Browse files Browse the repository at this point in the history
* Adds L11 support

* Apply fixes from StyleCI

* Reverts change

* Fixes test suite

* Excludes L11 on PHP 8.1

---------

Co-authored-by: StyleCI Bot <bot@styleci.io>
  • Loading branch information
nunomaduro and StyleCIBot committed Nov 29, 2023
1 parent 1ccbccf commit 6d6009c
Show file tree
Hide file tree
Showing 3 changed files with 117 additions and 53 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

Expand Down
22 changes: 11 additions & 11 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
143 changes: 102 additions & 41 deletions tests/Stubs/OutputStub.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
}
}
}

0 comments on commit 6d6009c

Please sign in to comment.