2.5.0
What's Changed
Add document_uri DOM configurator by @veewee in #48
Allows you to keep track of the document uri, even if you are using an in-memory string.
Internally, it sets DOMDocument::$documentURI
, which gets used as file
in the error handling issues component.
use VeeWee\Xml\Dom\Document;
use function VeeWee\Xml\Dom\Configurator\document_uri;
$wsdl = 'http://myservice.com?wsdl';
Document::fromXmlString(
$loadFromHttp($wsdl),
document_uri($wsdl)
);
Add 'expect*' shortcut functions to NodeList by @veewee in #47
Provides shortcut functions to the NodeList
that allow you to grab a single element OR throw a customizable exception instead.
$item = $list->expectAt(0, 'Expected an element at index %s');
$item = $list->expectFirst('Expected a first element.');
$item = $list->expectSingle('Expected exactly 1 element, got %s');
$item = $list->expectLast('Expected an element at index %s');
Full Changelog: 2.4.0...2.5.0