This new version introduces 1 breaking change in the Reader component:
Reader
Instead of providing the results as a string, this string are now wrapped with a MatchingNode.
This allows us to also provide information like the matched NodeSequence and some shortcut functions for converting this XML into a DOM Document or decoded version of the XML.
If you are using the Reader of v2, you will have to change your implementation to support the MatchingNode instead of the string result from previous version.
An example:
use VeeWee\Xml\Dom\Configurator;
use VeeWee\Xml\Reader\Signal;
use function VeeWee\Xml\Reader\Matcher\element_name;
use function VeeWee\Xml\Reader\Matcher\sequence;
$reader = VeeWee\Xml\Reader\Reader::fromXmlString($xml);
$signal = new Signal();
foreach ($reader->provide(element_name('tag'), $signal) as $tag) {
// New result of the reader is now a DTO that contains both the XML and node sequence.
var_dump(
// This is the previous matched XML string
$tag->xml(),
// Contains a match function so that you can run a secondary matcher on the result.
// Can be handy if you are matching on multiple paths in one read for example.
$tag->matches(sequence(
</tr></table>
... (truncated)
Commits
90affd5 Merge pull request #68 from veewee/drop-deprecations
d102ab0 Improve opcode cachability for autoloading
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Updates the requirements on veewee/xml to permit the latest version.
Release notes
Sourced from veewee/xml's releases.
... (truncated)
Commits
90affd5
Merge pull request #68 from veewee/drop-deprecationsd102ab0
Improve opcode cachability for autoloadingbb3ff4e
Drop deprecations1770824
Merge pull request #66 from veewee/reader-improvements143c565
Merge pull request #67 from veewee/shortcut-functionseaba15b
Add stringify and document element shortcuts to XML Document54bb7ec
Add reader MatchingNode results and a signal to stop reading3172e96
Merge pull request #65 from veewee/writer-improvementse85cb58
Improve writer implementation78a4ba4
Merge pull request #63 from veewee/php83Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show