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
The new ClassName is a hard dependency. In order to allow dependency injection, we can add a endeavor factory. This factory being stateless, it would be used in service declaration in Symfony container.
Once #4 is implemented, this will simplify the automatic injection of the logger.
Usage:
class MyService
{
public function __construct(
private EndeavorFactory $endeavor,
) {}
public function process()
{
// random code
$this->endeavor->constant(500)->run(function () {
// Actual processing
});
}
}
The
new ClassName
is a hard dependency. In order to allow dependency injection, we can add a endeavor factory. This factory being stateless, it would be used in service declaration in Symfony container.Once #4 is implemented, this will simplify the automatic injection of the logger.
Usage:
Factory method would be:
The text was updated successfully, but these errors were encountered: