Skip to content

Latest commit

 

History

History
62 lines (49 loc) · 2.74 KB

File metadata and controls

62 lines (49 loc) · 2.74 KB

Documentation

This guide is organized around real integration tasks for the shipped PHP 8.3+ library.

Start Here

  • 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, and DescriptorInstantiator.
  • 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.

What You Use Directly

Most consumers interact with these namespaces:

  • LiquidRazor\DIRegistry\Bootstrap RegistryCompiler turns normalized definition arrays into a compiled registry.
  • LiquidRazor\DIRegistry\Registry CompiledRegistry provides immutable descriptor lookups.
  • LiquidRazor\DIRegistry\Resolver DescriptorResolver chooses exactly one descriptor for a contract or class path.
  • LiquidRazor\DIRegistry\Instantiator DescriptorInstantiator builds objects from already-selected descriptors.
  • LiquidRazor\DIRegistry\Runtime InMemoryRuntimeInstanceStore manages singleton, scoped, and pooled runtime state.
  • LiquidRazor\DIRegistry\Contract Public extension points such as DependencyValueProviderInterface.

Recommended Reading Path

If you are evaluating the library for a project, this route gives the shortest accurate picture:

  1. Library Overview
  2. Installation
  3. First Registry
  4. First Resolution
  5. Public Contracts

Repository Shape

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/.