This repository implements the filesystem discovery stage for LiquidRazor. Its job is to turn a validated discovery configuration into a lazy stream of PHP file paths.
The public runtime entry points are:
LiquidRazor\FileLocator\Config\DiscoveryConfigFactoryLiquidRazor\FileLocator\FileLocator
Typical flow:
<?php
use LiquidRazor\FileLocator\Config\DiscoveryConfigFactory;
use LiquidRazor\FileLocator\FileLocator;
$config = (new DiscoveryConfigFactory())->create('/absolute/project/root');
$locator = new FileLocator($config);DiscoveryConfigFactory assembles a DiscoveryConfig.
FileLocator consumes that config and yields files.
The runtime config is composed of readonly value objects:
DiscoveryConfigDiscoveryDefaultsRootConfig
These objects hold normalized values so traversal does not re-interpret YAML or re-normalize config paths.
The repository follows a strict dependency direction:
include <- lib <- src
Layer responsibilities:
include/- config value objects
- enums
- exceptions
lib/- discovery config validation
- path normalization
- path filtering
src/- runtime composition
- ConfigLoader integration
- public locator entry point
Implemented here:
- discovery config validation
- path normalization
- directory traversal
- file filtering
- lazy file output
Explicitly not implemented here:
- YAML or JSON parsing
- environment interpolation
- class discovery
- reflection
- tokenization or AST parsing
- service container logic
- descriptor generation
- registry loading
This library is the first stage in the larger LiquidRazor pipeline:
FileLocator -> ClassLocator -> RegistryLoader
Only FileLocator is part of this repository.