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
On this page
Latest version v8.2.0, released November 28, 2026. MIT license. Source repository
Its v8.0.0-BETA1 release requires PHP 8.4 or later. PHP end of life dates.
symfony/dom-crawler v8.0.0 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 - Signature changed
Symfony\Component\DomCrawler\Crawler::closest
Was public function closest(string $selector): ?self; now public function closest(string $selector): ?static. packagist.org - 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
symfony/dom-crawler v8.0.0-BETA1 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 - 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
symfony/dom-crawler v7.0.0 breaking changes
- Signature changed
Symfony\Component\DomCrawler\AbstractUriElement::$currentUri
Was protected $currentUri; now protected ?string $currentUri. packagist.org - Signature changed
Symfony\Component\DomCrawler\AbstractUriElement::$method
Was protected $method; now protected ?string $method. packagist.org - Signature changed
Symfony\Component\DomCrawler\AbstractUriElement::$node
Was protected $node; now protected \DOMElement $node. packagist.org - Signature changed
Symfony\Component\DomCrawler\AbstractUriElement::setNode
Was abstract protected function setNode(\DOMElement $node); now abstract protected function setNode(\DOMElement $node): void. packagist.org - 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 - Signature changed
Symfony\Component\DomCrawler\Crawler::$uri
Was protected $uri; now protected ?string $uri. packagist.org - 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 - 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 - Signature changed
Symfony\Component\DomCrawler\Crawler::addDocument
Was public function addDocument(\DOMDocument $dom); now public function addDocument(\DOMDocument $dom): void. packagist.org - 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
And 32 more in this version. Sign up to see every change
symfony/dom-crawler v7.0.0-BETA1 breaking changes
- Removed
The package now requires PHP 8.2 or later. Upgrade PHP before using this version. github.com - 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
Related packages
Check your code
These are the changes. To see which of them reach your code, scan a public repository, or have your coding agent call check_code with your manifest or lockfile over MCP. The 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.
See how out of date your code is.
Tell your agent what changed since it was trained.
claude mcp add --transport http since https://api.since.dev/mcpCodex, Cursor and any MCP client use https://api.since.dev/mcp.