symfony/symfony — pull request #12487 by StephaneSeng (2014-11-15 14:31:28+00:00)
Title: [DomCrawler] Added support for 'link' tags in the Link class

| Q | A
| ------------- | ---
| Bug fix? | No
| New feature? | Not really
| BC breaks? | No
| Deprecations? | No
| Tests pass? | Yes (at least those of DomCrawler)
| Fixed tickets | N/A
| License | MIT
| Doc PR | N/A

My use case is that I crawl web pages for RSS links so I need to retrieve the 'href' attributes of 'link' elements.
I would like to use the Link class to resolve encountered 'href' relative URLs.

Please note that I did not replace `if ('a' !== $node->nodeName && 'area' !== $node->nodeName)` with `if (!$node->hasAttribute('href'))` to ensure backward compatibility.
Indeed, according to http://www.w3.org/TR/html5/links.html, the 'href' attribute is optional for 'a' and 'area' elements.