[Proposal] Application config compilation #26
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem Statement
Magento's modular nature necessitates a complex configuration and metadata retrieval process. However, the inherent complexity of this process is exacerbated by the inconsistent implementation. Magento employs two opposing methods for retrieving developer configuration and metadata: the Just-In-Time approach and the Ahead-Of-Time approach.
The Just-In-Time Approach
In this approach, when the Magento application needs to obtain its configuration (di.xml, events.xml, system.xml, etc.), it reads the relevant configuration files from all modules, merges them, validates the merged configuration, and caches it.
The Ahead-Of-Time Approach
When operating in production mode, Magento assumes that all Dependency Injection (DI) and Interception metadata, as well as generated classes, have already been produced by the Magento compiler, a separate application.
These contradictory approaches lead to confusion and hinder the developer experience by:
Proposed Solution
Contribution checklist (*)