Closed
Description
Symfony version(s) affected: "symfony/dom-crawler": "4.2"
Description
Getting exception thrown when calling form():
TypeError : Argument 2 passed to Symfony\Component\DomCrawler\Form::__construct() must be of the type string, null given
How to reproduce
$form = $crawler->filter('button.btn-class')->form();
Possible Solution
Making 2nd ctor param of Symfony\Component\DomCrawler\Form
nullable fixes the problem:
public function __construct(\DOMElement $node, ?string $currentUri, string $method = null, string $baseHref = null)
Additional context
PHP 7.2.11 / Laravel 5.6.27 / PHPUnit 7.2.7