FullCalendarBundle handle event error in symfony 3.4

I installed fullcalendarbundle, and I configured it as it is mentioned on the Github
https://github.com/tattali/CalendarBundle/blob/master/src/Resources/doc/doctrine-crud.md#3-create-the-crud, I can display the calendar. But when I try to create calendar event. I have error

The "AppBundleRepositoryCalendarEventsRepository" entity repository implements "DoctrineBundleDoctrineBundleRepositoryServiceEntityRepositoryInterface", but its service could not be found. Make sure the service exists and is tagged with "doctrine.repository_service". 

Here is my repository

<?php
namespace AppBundleRepository;
use AppBundleEntityCalendarEvents;
use DoctrineBundleDoctrineBundleRepositoryServiceEntityRepository;
use SymfonyBridgeDoctrineRegistryInterface;
class CalendarEventsRepository extends ServiceEntityRepository
{
    public function __construct(RegistryInterface $registry)
    {
        parent::__construct($registry, CalendarEvents::class);
    }
}

My services.yml configured like this.

parameters:
services:
  #default configuration for services in *this* file

    _defaults:
        autowire: true
        autoconfigure: true
        public: false

    AppBundle:
        resource: '../../src/AppBundle/*'
        exclude: '../../src/AppBundle/{Entity,Repository,Tests}'

    AppBundleController:
        resource: '../../src/AppBundle/Controller'
        public: true
        tags: ['controller.service_arguments']


   # AppBundleServiceExampleService:
   #   arguments:
   #          $someArgument: 'some_value'
   #   AppBundleTwigPlanningExtension:
   #         tags: ['twig.extension']
   # adding the required tag to all repository services

   #AppBundleRepositoryCalendarEventsRepository:
   #   arguments:
   #      - '@doctrine.orm.entity_manager'
   #      - '@=service("doctrine.orm.entity_manager").getClassMetadata("AppBundleEntityCalendarEvents")'
   #   tags:
        # - { name: doctrine.repository_service }

I’m on symfony 3.4. I looked for several solutions without success, if you have a solution. I will be glad you help me.

Source: Symfony Questions

Was this helpful?

0 / 0

Leave a Reply 0

Your email address will not be published. Required fields are marked *