Skip to content

Commit 2d646ac

Browse files
committed
minor #521 Fix tests (derrabus)
This PR was merged into the 1.x branch. Discussion ---------- Fix tests Commits ------- 2e8d785 Fix tests
2 parents 66501ca + 2e8d785 commit 2d646ac

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

composer.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,11 @@
2222
"ext-libxml": "*",
2323
"php-webdriver/webdriver": "^1.8.2",
2424
"symfony/browser-kit": "^4.4 || ^5.0",
25+
"symfony/dependency-injection": "^4.4 || ^5.0",
2526
"symfony/deprecation-contracts": "^2.4 || ^3.0",
2627
"symfony/dom-crawler": "^4.4 || ^5.0",
2728
"symfony/http-client": "^4.4.11 || ^5.2",
29+
"symfony/http-kernel": "^4.4 || ^5.0",
2830
"symfony/polyfill-php72": "^1.9",
2931
"symfony/process": "^4.4 || ^5.0"
3032
},

phpstan.neon

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ parameters:
66
bootstrapFiles:
77
- vendor/bin/.phpunit/phpunit/vendor/autoload.php
88
inferPrivatePropertyTypeFromConstructor: true
9+
excludePaths:
10+
- tests/DummyKernel.php
911
ignoreErrors:
1012
- message: '#.+#'
1113
path: tests/DummyKernel.php
@@ -16,4 +18,6 @@ parameters:
1618
# Require a redesign of the underlying Symfony components
1719
- '#Call to an undefined method DOMNode::getTagName\(\)\.#'
1820
- '#Return type \(void\) of method Symfony\\Component\\Panther\\DomCrawler\\Crawler::clear\(\) should be compatible with return type \(Facebook\\WebDriver\\WebDriverElement\) of method Facebook\\WebDriver\\WebDriverElement::clear\(\)#'
19-
- '#Method Symfony\\Component\\Panther\\DomCrawler\\Crawler::getIterator\(\) should return ArrayIterator&iterable<DOMNode> but returns ArrayIterator<\(int\|string\), Facebook\\WebDriver\\WebDriverElement>\.#'
21+
- '#Method Symfony\\Component\\Panther\\DomCrawler\\Crawler::getIterator\(\) should return ArrayIterator<int, DOMNode> but returns ArrayIterator<\(int\|string\), Facebook\\WebDriver\\WebDriverElement>\.#'
22+
- '#^Expression on left side of \?\? is not nullable\.$#'
23+
- '#^PHPDoc type array of property Symfony\\Component\\Panther\\DomCrawler\\Field\\FileFormField\:\:\$value is not covariant with PHPDoc type string of overridden property Symfony\\Component\\DomCrawler\\Field\\FormField\:\:\$value\.$#'

src/DomCrawler/Crawler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public function __construct(array $elements = [], ?WebDriver $webDriver = null,
3838
{
3939
$this->uri = $uri;
4040
$this->webDriver = $webDriver;
41-
$this->elements = $elements ?? [];
41+
$this->elements = $elements;
4242
}
4343

4444
public function clear(): void

0 commit comments

Comments
 (0)