PL\OrderBundle\Entity\OrderHasComment the constructor requests a required argument, but do not provide it when creating a new instance of the object.
You create a new OrderHasComment (whatever that is):
$object = new OrderHasComment()
Remove this - it will no longer be needed when your listener calls something like setContext(...), and it does not need to create an object ... therefore it should not be mandatory in any case.
public function __construct(ContextInterface $context) /
{
... should become:
public function __construct()
{
This solves the problem responsible for the exception.
source
share