Metadata Providers
Metadata providers are responsible for "freezing" (building) and providing "frozen" metadata.
One of the main ones is MetadataBuilder, which contains the rules for transforming the mutable read data from metadata readers and assembling it into the final immutable result.
During metadata assembly, a MetadataBuilder may require a number of additional optional dependencies. All of these can be passed to the constructor:
Expressions Executor - Executing expressions within metadata
PSR-20 Clock - Explicitly specifying the metadata generation time
Reference Resolver - Type dependencies inference (also called "linking")
Information about other built-in providers is available on the corresponding documentation pages:
In-Memory Provider - Metadata memoization (RAM Cache)
PSR-6 Cache Provider - Metadata caching using PSR-6 Cache drivers
PSR-16 Cache Provider - Metadata caching using PSR-16 Cache drivers
Null Provider - Returns empty metadata objects
You can pass the metadata provider to a platform that uses types that require metadata. So the complete example of using providers would look like this: