Skip to content

Rebase on horde/yaml document layer#2

Merged
ralflang merged 6 commits into
FRAMEWORK_6_0from
feat/rebase-on-document-layer
Jun 18, 2026
Merged

Rebase on horde/yaml document layer#2
ralflang merged 6 commits into
FRAMEWORK_6_0from
feat/rebase-on-document-layer

Conversation

@ralflang

Copy link
Copy Markdown
Member

Load via YamlFileLoader, emit via YamlFileDumper. Top-level diff-and-apply syncer preserves comments and blank lines around unchanged entries.

stdClass facade unchanged. Sub-object fromStdClass/toStdClass contracts unchanged. Public API unchanged.

Composer: horde/yaml ^3.0.0RC1 || dev-FRAMEWORK_6_0.

168 existing tests green plus 9 new round-trip fidelity tests.

ralflang added 6 commits June 18, 2026 21:57
Constructor uses YamlFileLoader instead of Yaml::load(). Two new
helpers (streamToArray, nodeToArray) reduce the AST to the plain
PHP array that arrayToObject already consumes.

Empty-file branch dropped: documentCount()==0 yields []. Bare-
scalar roots collapse to an empty top-level map. Multi-doc files
collapse to the first document.

Save side still uses the legacy dumper. Wire-up comes in step 3.

Composer: horde/yaml ^3.0.0RC1 || dev-FRAMEWORK_6_0.

168 tests green.
Add private $stream: YamlStream slot. The constructor now stores
the loaded AST in addition to the legacy stdClass facade. Save
side and __toString still use the legacy dumper; that wire-up
comes in step 3.

168 tests green.
@ralflang ralflang merged commit ab78f1b into FRAMEWORK_6_0 Jun 18, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant