This guide is organized around real integration tasks for the shipped PHP 8.3+ library.
- Getting Started Install the package, compile a minimal registry, and instantiate a first service.
- Overview Understand the design constraints before you wire the runtime into an application.
- Core Concepts Learn how descriptors, resolution, lifecycles, and runtime context behave.
- Usage Guide
See the concrete bootstrap flow built around
RegistryCompiler,DescriptorResolver, andDescriptorInstantiator. - Reference Look up public interfaces, value objects, enums, and exceptions.
- Validation & Debug Trace compile failures, resolver errors, factory issues, and graph problems.
- Internals Review the concrete implementation details that back the public API.
- Examples Copy minimal patterns for constructor wiring, factories, and environment-specific bindings.
Most consumers interact with these namespaces:
LiquidRazor\DIRegistry\BootstrapRegistryCompilerturns normalized definition arrays into a compiled registry.LiquidRazor\DIRegistry\RegistryCompiledRegistryprovides immutable descriptor lookups.LiquidRazor\DIRegistry\ResolverDescriptorResolverchooses exactly one descriptor for a contract or class path.LiquidRazor\DIRegistry\InstantiatorDescriptorInstantiatorbuilds objects from already-selected descriptors.LiquidRazor\DIRegistry\RuntimeInMemoryRuntimeInstanceStoremanages singleton, scoped, and pooled runtime state.LiquidRazor\DIRegistry\ContractPublic extension points such asDependencyValueProviderInterface.
If you are evaluating the library for a project, this route gives the shortest accurate picture:
The codebase preserves the strict split defined by the project rules:
include/Public contracts, immutable descriptors, enums, exceptions, and value objects.lib/Reusable low-level helpers for validation, selection, and runtime key construction.src/Concrete runtime services such as the compiler, resolver, instantiator, runtime store, and debug validator.
That layout matters when you read the internals pages or contribute changes. Public API lives at the boundary; orchestration stays in src/.