respect-validation/docs/configuration.md
Alexandre Gomes Gaigalas 91ceaafd2d Update translation docs
The documents on translation were updated to feature symfony with
an array provider. Duplicated container notes were extracted to
a single configuration.md file.

An API for accessing the messages, so users don't have to copy
and paste them from the source or docs, was provided and
TemplateResolver was refactored to use it.
2026-02-06 17:11:34 +00:00

687 B

Configuration

Container configuration

The ContainerRegistry::createContainer() method returns a PHP-DI container. The definitions array follows the PHP-DI definitions format.

If you prefer to use a different container, ContainerRegistry::setContainer() accepts any PSR-11 compatible container:

use Respect\Validation\ContainerRegistry;

ContainerRegistry::setContainer($yourPsr11Container);