Skip to content

[DomCrawler] The doc about adding content in a crawler shows unsupported usages #15046

Closed
@stof

Description

@stof

The doc at https://symfony.com/doc/current/components/dom_crawler.html#adding-the-content shows passing content inside the Crawler constructor and then calling add* methods on it. That's not a supported usage of the component.
You cannot mix multiple sources of content in the same Crawler instance. So a supported usage is to use either of the ways to add content, but not multiple ones like in this snippet.

See symfony/symfony#34950 for the original report.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions