You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 30, 2022. It is now read-only.
Currently we use protected methods to return the relevant middlewares adroit consists of and works on.
Due to this, you would have to inherit AdroitMiddleware to change that behavior / the used classes.
Imho the better approach would be to inject that middlewares by passing a Configuration instance to Adroit.
Configuration should:
have a protected constructor
provide a factory method Configuration::withDefaults() and which returns a Configuration with exactly the middlewares currently used by Adroit
have immutable methods which return a new instance having defined the new middleware (e.g. $configuration->withActionExecutorMiddleware)
should expose the current protected static attributes of adroit as public statics to enable reusage in own configuration since the constructors signatures may look different
Adroit then should:
have a protected constructor
only offer a factory method Adroit::create(Configuration $config = null)
use $this->config = Configuration::withDefaults() no config is given
The text was updated successfully, but these errors were encountered:
Currently we use protected methods to return the relevant middlewares adroit consists of and works on.
Due to this, you would have to inherit AdroitMiddleware to change that behavior / the used classes.
Imho the better approach would be to inject that middlewares by passing a Configuration instance to Adroit.
Configuration should:
Configuration::withDefaults()
and which returns a Configuration with exactly the middlewares currently used by Adroit$configuration->withActionExecutorMiddleware
)Adroit then should:
Adroit::create(Configuration $config = null)
$this->config = Configuration::withDefaults()
no config is givenThe text was updated successfully, but these errors were encountered: