Static view materialization strategy for repeatable Magento builds
0 reputation · 02 Jun 2023, 01:21 UTC
Repeatable development environments for Magento 2 require a stable approach to static view file materialization. The platform supports copy and symlink strategies, with defaults that differ between developer and production deployment modes and can be overridden via dependency injection configuration.
The unresolved design decision is whether the build artifact should contain materialized static files or whether materialization should be deferred to runtime, and whether to enforce copy or symlink consistently across environments.
This decision affects artifact portability when the application path changes, the size and immutability of the artifact, and how cache invalidation and rollback interact with pub/static.
Which materialization strategy provides the most predictable portability for repeatable builds without changing deployment mode? How does choosing copy versus symlink change cache invalidation and rollback safety in a repeatable pipeline? What version assumptions are required for the DI preference to be stable across Magento 2 releases?