Skip to content

Preserve package layout when reconciling dependency overlays #2055

Description

@chubes4

Problem

Composer dependency overlays with a consumer-side wrapper path relocate only PSR-4 source directories. For Blocks Engine, the standalone package maps src/ while Static Site Importer consumes php-transformer/src/. WP Codebox moves src/ but leaves php-transformer.php and the package Composer autoloader at the root.

The mounted bootstrap loads the nested authoritative classmap, which still resolves classes under the now-missing root src/. A real Lab recipe emitted 138 PHP autoload warnings before its structured payload and reached the runtime output ceiling mid-JSON. The fixture collector consequently reported ssi_validation: null, import_report: null, and missing provenance even when running the structured-output repair from #2048.

Evidence

  • Lab run: 10b9a5f5-4782-4f77-9b29-cf2afe61d1ac
  • Candidate runtime: WP Codebox commit 789b5aa5806f914afd4f0c1684af690f4947f930 from Preserve structured WP-CLI recipe results #2054
  • Raw output artifact SHA-256: 1dc2de341beb689dcbc6b37373ed2dcafecd25b3d28534f9567362e7b27409be
  • Validation stdout: 1,047,387 characters, 138 PHP warnings, truncated mid-JSON
  • Warning path: /wordpress/wp-content/plugins/static-site-importer/vendor/automattic/blocks-engine-php-transformer/vendor/composer/../../src/...

Expected

When consumer PSR-4 paths add a common package wrapper, stage the coherent package layout under that wrapper so bootstraps, source files, and package-local Composer metadata continue to agree. Preserve generic relocation behavior for non-wrapper path changes. Add deterministic coverage that executes or validates the package bootstrap/autoloader layout, not only the relocated class path.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions