Skip to content

Commit c9c4cf1

Browse files
committed
Add support for Symfony 8
1 parent bc606ef commit c9c4cf1

File tree

4 files changed

+14
-9
lines changed

4 files changed

+14
-9
lines changed

composer.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@
2828
"ext-dom": "*",
2929
"ext-libxml": "*",
3030
"php-webdriver/webdriver": "^1.8.2",
31-
"symfony/browser-kit": "^6.4 || ^7.3 || ^8.0",
32-
"symfony/dependency-injection": "^6.4 || ^7.3 || ^8.0",
31+
"symfony/browser-kit": "^6.4 || ^7.3 || ^8.0 || ^8.0",
32+
"symfony/dependency-injection": "^6.4 || ^7.3 || ^8.0 || ^8.0",
3333
"symfony/deprecation-contracts": "^2.4 || ^3",
34-
"symfony/dom-crawler": "^6.4 || ^7.3 || ^8.0",
35-
"symfony/http-client": "^6.4 || ^7.0",
36-
"symfony/http-kernel": "^6.4 || ^7.3 || ^8.0",
37-
"symfony/process": "^6.4 || ^7.3 || ^8.0"
34+
"symfony/dom-crawler": "^6.4 || ^7.3 || ^8.0 || ^8.0",
35+
"symfony/http-client": "^6.4 || ^7.0 || ^8.0",
36+
"symfony/http-kernel": "^6.4 || ^7.3 || ^8.0 || ^8.0",
37+
"symfony/process": "^6.4 || ^7.3 || ^8.0 || ^8.0"
3838
},
3939
"require-dev": {
4040
"symfony/css-selector": "^6.4 || ^7.3 || ^8.0",

src/Client.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ protected function createCrawler(): PantherCrawler
291291
return new PantherCrawler($elements, $this->webDriver, $this->webDriver->getCurrentURL());
292292
}
293293

294-
protected function doRequest($request)
294+
protected function doRequest(object $request): object
295295
{
296296
throw new LogicException('Not useful in WebDriver mode.');
297297
}

src/DomCrawler/Crawler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ public function matches(string $selector): bool
142142
return $this->filterXPath($xpath)->count() > 0;
143143
}
144144

145-
public function closest(string $selector): ?self
145+
public function closest(string $selector): ?static
146146
{
147147
$converter = $this->createCssSelectorConverter();
148148
$xpath = WebDriverBy::xpath($converter->toXPath($selector, 'self::'));

tests/DummyKernel.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
*/
2727
class DummyKernel implements KernelInterface
2828
{
29-
public function handle(Request $request, $type = self::MASTER_REQUEST, $catch = true): Response
29+
public function handle(Request $request, $type = self::MAIN_REQUEST, $catch = true): Response
3030
{
3131
return new Response();
3232
}
@@ -150,4 +150,9 @@ public function getBuildDir(): string
150150
{
151151
return '';
152152
}
153+
154+
public function getShareDir(): ?string
155+
{
156+
return null;
157+
}
153158
}

0 commit comments

Comments
 (0)