---
title: "symfony/dom-crawler v8.0.0 Breaking Changes on Packagist"
description: "What each symfony/dom-crawler release removed, renamed or changed: 49 breaking changes in 4 versions on Packagist, each with its source."
canonical_url: https://since.dev/packages/packagist/symfony/dom-crawler
last_updated: 2026-12-04
---

# symfony/dom-crawler breaking changes

symfony/dom-crawler v8.0.0 (November 27, 2025) is its newest release with breaking changes, 3 of them. The first: Signature changed Symfony\\Component\\DomCrawler\\Crawler::\_\_construct. Every breaking API change we have recorded in symfony/dom-crawler on Packagist: 49 breaking changes in 4 versions. Below, its 4 versions with breaking changes, newest first, removals and renames first, each with its source.

Updated December 4, 2026

Latest version `v8.2.0`, released November 28, 2026. MIT license. [Source repository](https://github.com/symfony/dom-crawler)

Its v8.0.0-BETA1 release requires [PHP 8.4](https://since.dev/calendar/php/8.4.md) or later. [PHP end of life dates](https://since.dev/calendar/php.md).

- From [v7.0.0](#v-v7-0-0) to [v8.0.0](#v-v8-0-0): 5 breaking changes in 2 versions.

## symfony/dom-crawler v8.0.0 breaking changes

symfony/dom-crawler v8.0.0, released November 27, 2025: 3 breaking changes.

- **Signature changed** `Symfony\Component\DomCrawler\Crawler::__construct`  

Was public function \_\_construct(\\DOMNodeList|\\DOMNode|array|string|null $node = null, protected ?string $uri = null, ?string $baseHref = null, private bool $useHtml5Parser = true); now public function... [packagist.org](https://packagist.org/packages/symfony/dom-crawler#v8.0.0)
- **Signature changed** `Symfony\Component\DomCrawler\Crawler::closest`  

Was public function closest(string $selector): ?self; now public function closest(string $selector): ?static. [packagist.org](https://packagist.org/packages/symfony/dom-crawler#v8.0.0)
- **Signature changed** `Symfony\Component\DomCrawler\Crawler::evaluate`  

Was public function evaluate(string $xpath): array|self; now public function evaluate(string $xpath): array|static. [packagist.org](https://packagist.org/packages/symfony/dom-crawler#v8.0.0)

## symfony/dom-crawler v8.0.0-BETA1 breaking changes

symfony/dom-crawler v8.0.0-BETA1, released November 27, 2025: 2 breaking changes.

- **Removed**  

Symfony 8 requires PHP 8.4 or later, so code running on older PHP versions must upgrade PHP before using this release. [github.com](https://github.com/symfony/dom-crawler/releases/tag/v8.0.0-BETA1)
- **Behavior changed**  

DomCrawler now always parses markup according to HTML5 rules using the native DOM parser, so existing code may see different parsed trees and results. [github.com](https://github.com/symfony/dom-crawler/releases/tag/v8.0.0-BETA1)

## symfony/dom-crawler v7.0.0 breaking changes

symfony/dom-crawler v7.0.0, released November 29, 2023: 42 breaking changes.

- **Signature changed** `Symfony\Component\DomCrawler\AbstractUriElement::$currentUri`  

Was protected $currentUri; now protected ?string $currentUri. [packagist.org](https://packagist.org/packages/symfony/dom-crawler#v7.0.0)
- **Signature changed** `Symfony\Component\DomCrawler\AbstractUriElement::$method`  

Was protected $method; now protected ?string $method. [packagist.org](https://packagist.org/packages/symfony/dom-crawler#v7.0.0)
- **Signature changed** `Symfony\Component\DomCrawler\AbstractUriElement::$node`  

Was protected $node; now protected \\DOMElement $node. [packagist.org](https://packagist.org/packages/symfony/dom-crawler#v7.0.0)
- **Signature changed** `Symfony\Component\DomCrawler\AbstractUriElement::setNode`  

Was abstract protected function setNode(\\DOMElement $node); now abstract protected function setNode(\\DOMElement $node): void. [packagist.org](https://packagist.org/packages/symfony/dom-crawler#v7.0.0)
- **Signature changed** `Symfony\Component\DomCrawler\Crawler::__construct`  

Was public function \_\_construct(\\DOMNodeList|\\DOMNode|array|string|null $node = null, ?string $uri = null, ?string $baseHref = null, bool $useHtml5Parser = true); now public function \_\_construct(\\DOMNodeList|\\DOMNode|array|string $node =... [packagist.org](https://packagist.org/packages/symfony/dom-crawler#v7.0.0)
- **Signature changed** `Symfony\Component\DomCrawler\Crawler::$uri`  

Was protected $uri; now protected ?string $uri. [packagist.org](https://packagist.org/packages/symfony/dom-crawler#v7.0.0)
- **Signature changed** `Symfony\Component\DomCrawler\Crawler::add`  

Was public function add(\\DOMNodeList|\\DOMNode|array|string|null $node); now public function add(\\DOMNodeList|\\DOMNode|array|string|null $node): void. [packagist.org](https://packagist.org/packages/symfony/dom-crawler#v7.0.0)
- **Signature changed** `Symfony\Component\DomCrawler\Crawler::addContent`  

Was public function addContent(string $content, ?string $type = null); now public function addContent(string $content, string $type = null): void. [packagist.org](https://packagist.org/packages/symfony/dom-crawler#v7.0.0)
- **Signature changed** `Symfony\Component\DomCrawler\Crawler::addDocument`  

Was public function addDocument(\\DOMDocument $dom); now public function addDocument(\\DOMDocument $dom): void. [packagist.org](https://packagist.org/packages/symfony/dom-crawler#v7.0.0)
- **Signature changed** `Symfony\Component\DomCrawler\Crawler::addHtmlContent`  

Was public function addHtmlContent(string $content, string $charset = 'UTF-8'); now public function addHtmlContent(string $content, string $charset = 'UTF-8'): void. [packagist.org](https://packagist.org/packages/symfony/dom-crawler#v7.0.0)

And 32 more in this version. [Sign up to see every change](https://app.since.dev/login?mode=signup&src=package-page)

## symfony/dom-crawler v7.0.0-BETA1 breaking changes

symfony/dom-crawler v7.0.0-BETA1, released November 29, 2023: 2 breaking changes.

- **Removed**  

The package now requires PHP 8.2 or later. Upgrade PHP before using this version. [github.com](https://github.com/symfony/dom-crawler/releases/tag/v7.0.0-BETA1)
- **Signature changed**  

Public and protected properties gained type declarations, so subclasses redeclaring them with different or missing types will fail. Align subclass property types with the new declarations. [github.com](https://github.com/symfony/dom-crawler/releases/tag/v7.0.0-BETA1)

## Related packages

- [symfony/asset](https://since.dev/packages/packagist/symfony/asset.md)
- [symfony/browser-kit](https://since.dev/packages/packagist/symfony/browser-kit.md)
- [symfony/cache](https://since.dev/packages/packagist/symfony/cache.md)
- [symfony/config](https://since.dev/packages/packagist/symfony/config.md)
- [symfony/console](https://since.dev/packages/packagist/symfony/console.md)
- [symfony/css-selector](https://since.dev/packages/packagist/symfony/css-selector.md)

## Check your code

These are the changes. To see which of them reach your code, [scan a public repository](https://since.dev/scan.md), or have your coding agent call `check_code` with your manifest or lockfile over [MCP](https://since.dev/docs.md#mcp). [The API](https://since.dev/docs.md#api) reads every change in every version. A fix pull request opens for the changes that reach a connected repository. Nothing merges or deploys.

## Put your code on continuous maintenance.

Scan a public repository now, or give your agent one line.

[Scan a repository](https://since.dev/scan.md). Any public GitHub repository. No sign-in.

### Tell your agent what changed since it was trained.

`claude mcp add --transport http since https://api.since.dev/mcp`

[Get an API key](https://app.since.dev/login?mode=signup)

Codex, Cursor and any MCP client use https://api.since.dev/mcp.

---

Every page on this site as Markdown: https://since.dev/sitemap.md. For agents: https://since.dev/llms.txt.
