неужели, пошла какая-то конкретика
Error: Cannot instantiate interface Doctrine\ORM\EntityManagerInterface
Doctrine\ORM\EntityManagerInterface: ~
decorates: Doctrine\ORM\EntityManagerInterface
написать:decorates: '@doctrine.orm.entity_manager'
services:
App\Mailer: ~
App\DecoratingMailer:
decorates: App\Mailer
# pass the old service as an argument
arguments: ['@.inner']
// src/Service/DecoratorService.php
namespace App\Service;
use Acme\OptionalBundle\Service\OptionalService;
class DecoratorService
{
private $decorated;
public function __construct(?OptionalService $decorated)
{
$this->decorated = $decorated;
}
public function tellInterestingStuff(): string
{
if (!$this->decorated) {
return 'Just one interesting thing';
}
return $this->decorated->tellInterestingStuff().' + one more interesting thing';
}
}