Skip to content

DiDefinitionInterface must throw DiDefinitionExceptionInterface #298

@agdobrynin

Description

@agdobrynin

Все определения должны выбрасывать Kaspi\DiContainer\Interfaces\Exceptions\DiDefinitionExceptionInterface.

Сам интерфейс должен содержать метод Kaspi\DiContainer\Interfaces\Exceptions\DiDefinitionExceptionInterface::getContext() для анализа или возможной записи в лог. Реализовывать будем через интерфейс (как дополнительная имплементация)

interface ContextExceptionInterface extends ContainerExceptionInterface
{
    /**
     * @return array<non-negative-int|string, mixed>
     */
    public function getContext(): array;

    public function setContext(mixed ...$context): self;
}

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions