Skip to content

feat: expose public Encore manifest array loader - #5

Merged
brianvarskonst merged 2 commits into
mainfrom
feat/encore-array-loader
Oct 1, 2026
Merged

brianvarskonst merged 2 commits into
mainfrom
feat/encore-array-loader

Conversation

@brianvarskonst

@brianvarskonst brianvarskonst commented Oct 1, 2026 •

Copy link
Copy Markdown
Member

Adds the public EncoreEntrypointsLoader::loadFromArray(array $data, string $resource) API so consumers can load a decoded, validated manifest without subclassing the loader or reading the manifest again. Relative paths, chunk dependencies, URL mapping and version settings match the existing file loader. Input validation remains the caller's responsibility; runtime file/inline policies are unchanged.

The full suite exposed 12 existing provider-annotation failures under newly resolved PHPUnit 13. A separate test-only commit converts these providers to attributes without changing datasets or assertions.

Validation: composer qa passes PHPCS, PHPStan and 245 tests / 575 assertions (one existing skip). New tests cover a nonexistent manifest, nested file paths, URL mapping, chunk ordering/dependencies, empty input and equality with the file loader.

This API is required for S-2 in the theme-starter Review 3; the companion theme PR is SymPress/theme-starter#2. After publishing a stable Assets release, the theme can remove its protected-parser adapter and use this public API. No release or tag is created by this PR.

GitHub validation also passed: workflow lint, Composer target discovery and package QA.

@brianvarskonst

Copy link
Copy Markdown
Member Author

Standards

No actionable documented-standard violations or code-smell findings. The new API stays in the existing runtime loader and preserves optional-kernel boundaries. The public wrapper intentionally exposes the parser contract without duplicating it; DataProvider changes affect test metadata only.

Spec

No blocking findings. loadFromArray() reuses file-loader parsing, preserving paths, URLs, handles and chunk dependencies. Caller input-validation responsibility and the resource-path purpose are documented. No new file-read mechanism or downstream security-policy bypass was introduced.

Verification

Exact-head GitHub workflow lint, target discovery and package QA pass. Local full QA also passed: PHPCS, PHPStan, 245 tests / 575 assertions with one existing skip. Regression coverage includes a nonexistent manifest, nested paths, dependency ordering, empty input and file-loader parity.

Review totals: Standards 0 findings; Spec 0 findings. Theme adoption follows a stable Assets release.

@brianvarskonst
brianvarskonst merged commit 0e95b88 into main Oct 1, 2026
3 checks passed
@brianvarskonst
brianvarskonst deleted the feat/encore-array-loader branch October 6, 2026 10:51
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