feat: upgrade project to symfony 7.4
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace App\BusProNet;
|
||||
|
||||
use Symfony\Component\DomCrawler\Crawler;
|
||||
|
||||
/**
|
||||
* Builds a Crawler over BusPro's XML payloads.
|
||||
*
|
||||
* The Crawler constructor parses its content as HTML5, which flattens the
|
||||
* nesting BusPro's exports and API responses rely on, so XML has to be added
|
||||
* through addXmlContent() instead.
|
||||
*/
|
||||
final class XmlCrawlerFactory
|
||||
{
|
||||
public static function create(string $xml): Crawler
|
||||
{
|
||||
$crawler = new Crawler();
|
||||
$crawler->addXmlContent($xml);
|
||||
|
||||
return $crawler;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user