Skip to content

Commit

Permalink
Marked as incompatible with Symfony 4.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Christoph Singer committed Apr 18, 2019
1 parent edfd9a3 commit 4f92979
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
1.3.2
=====

2019-04-18

- Mark this version as incompatible to Symfony DomCrawler 4.3


1.3
===

Expand Down
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ HtmlPageDom

`Wa72\HtmlPageDom` is a PHP library for easy manipulation of HTML documents using DOM.
It requires [DomCrawler from Symfony2 components](https://github.com/symfony/DomCrawler) for traversing
the DOM tree and extends it by adding methods for manipulating the DOM tree of HTML documents.
the DOM tree and extends it by adding methods for manipulating the DOM tree of HTML documents.

It's useful when you need to not just extract information from an HTML file (what DomCrawler does) but
also to modify HTML pages. It is usable as a template engine: load your HTML template file, set new
Expand All @@ -22,6 +22,18 @@ the modified page.
DOM *manipulation* functions such as `html($htmltext)`, `before()`, `append()`, `wrap()`, `addClass()` or `css()`.
It's like jQuery for PHP: simply select elements of an HTML page using CSS selectors and change their
attributes and content.


> Incompatibility with Symfony 4.3
> --------------------------------
>
> In DomCrawler from Symfony 4.3 the method signatures of the methods `Crawler::text()` and
> `Crawler::html()` have changed: In earlier versions, they didn't accept an argument, so in our
> subclass `HtmlPageCrawler` we could add an optional argument to make those getter methods
> work as jQuery-style *setters*. In Symfony 4.3 however, those methods now accept an optional
> argument that is used as default value for the getter. We will have to change our API to make
> it compatible with Symfony 4.3.

- `HtmlPage` represents one complete HTML document and offers convenience functions like `getTitle()`, `setTitle($title)`,
`setMeta('description', $description)`, `getBody()`. Internally, it uses the `HtmlPageCrawler` class for
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
],
"require":{
"php":">=5.4.0",
"symfony/dom-crawler":"^2.3 <2.8 | ^2.8.3 | ^3.0.1 | ^4",
"symfony/dom-crawler":"^2.3 <2.8 | ^2.8.3 | ^3.0.1 | ^4 <4.3",
"symfony/css-selector":">=2.3"
},
"require-dev": {
Expand Down

0 comments on commit 4f92979

Please sign in to comment.