Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,13 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
php: [8.1, 8.2, 8.3]
php: [8.3, 8.4]
deps: [highest]
symfony: [6.4.*, 7.0.*]
symfony: [6.4.*, 7.4.*]
include:
- php: 8.1
deps: lowest
symfony: '*'
exclude:
- php: 8.1
symfony: 7.0.*
- php: 8.5
symfony: '8.0.*'

steps:
- uses: zenstruck/.github/actions/php-test-symfony@main
with:
Expand Down
14 changes: 7 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
}
],
"require": {
"php": ">=8.1",
"symfony/browser-kit": "^6.4|^7.0",
"symfony/css-selector": "^6.4|^7.0",
"symfony/dom-crawler": "^6.4|^7.0",
"symfony/framework-bundle": "^6.4|^7.0",
"php": ">=8.3",
"symfony/browser-kit": "^6.4|^7.0|^8.0",
"symfony/css-selector": "^6.4|^7.0|^8.0",
"symfony/dom-crawler": "^6.4|^7.0|^8.0",
"symfony/framework-bundle": "^6.4|^7.0|^8.0",
"zenstruck/assert": "^1.4",
"zenstruck/callback": "^1.4.2",
"zenstruck/dom": "^1.0"
Expand All @@ -29,8 +29,8 @@
"phpunit/phpunit": "^9.6.21|^10.4",
"symfony/mime": "^6.4|^7.0",
"symfony/panther": "^2.1.0",
"symfony/phpunit-bridge": "^6.0|^7.0",
"symfony/security-bundle": "^6.4|^7.0"
"symfony/phpunit-bridge": "^6.0|^7.0|^8.0",
"symfony/security-bundle": "^6.4|^7.0|^8.0"
},
"suggest": {
"justinrainbow/json-schema": "Json schema validator. Needed to use Json::assertMatchesSchema().",
Expand Down
5 changes: 5 additions & 0 deletions src/Browser.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
use Psr\Container\ContainerInterface;
use Symfony\Component\BrowserKit\AbstractBrowser;
use Symfony\Component\BrowserKit\CookieJar;
use Symfony\Component\BrowserKit\Request;
use Symfony\Component\BrowserKit\Response;
use Symfony\Component\DomCrawler\Crawler;
use Symfony\Component\Filesystem\Filesystem;
use Zenstruck\Browser\Assertion\SameUrlAssertion;
Expand Down Expand Up @@ -57,6 +59,9 @@ public function __construct(private Session $session, array $options = [])
$this->sourceDebug = $options['source_debug'] ?? false;
}

/**
* @return AbstractBrowser<Request, Response>
*/
final public function client(): AbstractBrowser
{
return $this->session->client();
Expand Down
8 changes: 8 additions & 0 deletions src/Browser/Session.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
namespace Zenstruck\Browser;

use Symfony\Component\BrowserKit\AbstractBrowser;
use Symfony\Component\BrowserKit\Request;
use Symfony\Component\BrowserKit\Response;
use Zenstruck\Dom;
use Zenstruck\Dom\Session as DomSession;

Expand All @@ -22,10 +24,16 @@
*/
abstract class Session implements DomSession
{
/**
* @param AbstractBrowser<Request, Response> $client
*/
public function __construct(private AbstractBrowser $client)
{
}

/**
* @return AbstractBrowser<Request, Response>
*/
final public function client(): AbstractBrowser
{
return $this->client;
Expand Down
Loading