Symfony generator generated the following class of repository:
namespace AppBundle\Repository;
use AppBundle\Entity\GroupEntity;
/**
* GroupEntityRepository
*
* This class was generated by the Doctrine ORM. Add your own custom
* repository methods below.
*/
class GroupEntityRepository extends \Doctrine\ORM\EntityRepository
{
}
services.yml:
group_entity_repository:
class: AppBundle\Repository\GroupEntityRepository
arguments: ["@doctrine.orm.entity_manager", AppBundle\Entity\GroupEntity]
I configured services.yml wrongly, but I do not now what to use as second argument. So I get the error:
Catchable Fatal Error: Argument 2 passed to Doctrine\ORM\EntityRepository::__construct() must be an instance of Doctrine\ORM\Mapping\ClassMetadata, string given, called in E:\other\dropbox\Dropbox\programavimas\kodo pavyzdziai\htdocs\users_admin_demo\var\cache\dev\appDevDebugProjectContainer.php on line 1626 and defined
How to fix it? I cannot see in the documentation, it just showed the code for generator and final generated class but no services config.