Skip to content

Commit

Permalink
Support Symfony 7.x
Browse files Browse the repository at this point in the history
  • Loading branch information
pfuhrmann committed Dec 1, 2023
1 parent 90d587f commit c859ac4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
"ext-dom":"*",
"ext-libxml":"*",
"symfony/polyfill-mbstring": "~1.0",
"symfony/dom-crawler":"^6",
"symfony/css-selector":"^6"
"symfony/dom-crawler":"^6.0 || ^7.0",
"symfony/css-selector":"^6.0 || ^7.0"
},
"require-dev": {
"phpunit/phpunit": "^9",
Expand Down
6 changes: 3 additions & 3 deletions src/HtmlPageCrawler.php
Original file line number Diff line number Diff line change
Expand Up @@ -921,7 +921,7 @@ public function filterXPath($xpath): static
*
* @return null|void
*/
public function addContent($content, $type = null)
public function addContent($content, $type = null): void
{
if (empty($type)) {
$type = 'text/html;charset=UTF-8';
Expand Down Expand Up @@ -956,11 +956,11 @@ public function addHtmlFragment($content, $charset = 'UTF-8')
*
* Overwritten from parent to allow Crawler to be added
*
* @param null|\DOMNodeList|array|\DOMNode|Crawler $node A node
* @param \DOMNodeList|\DOMNode|array|string|Crawler|null $node A node
*
* @api
*/
public function add($node)
public function add(\DOMNodeList|\DOMNode|array|string|Crawler|null $node): void
{
if ($node instanceof Crawler) {
foreach ($node as $childnode) {
Expand Down

0 comments on commit c859ac4

Please sign in to comment.