Inject error repository into `AbstractAuthorizer` by default
lindyhopchris opened this issue · comments
Christopher Gammie commented
As best practice is to create errors via an instance of the ErrorRepositoryInterface
, inject this into the AbstractAuthorizer
by default.
Add a new trait to use instead of ErrorsAwareTrait
that has an addError
method that accepts either an ErrorInterface
object or a string. If a string, will create the error from the repository. The method should return the error that was added so that methods such as setDetail
can then be chained off it.
Christopher Gammie commented
Closing as this is available via Componser on the v0.6.x-dev
release