fix migration for sqlite (#881)

This commit is contained in:
Kevin Papst
2019-06-30 15:16:44 +02:00
committed by GitHub
parent d8621f0b7a
commit 834a0a873f
7 changed files with 62 additions and 44 deletions

View File

@@ -12,7 +12,6 @@ declare(strict_types=1);
namespace App\API;
use App\Entity\Project;
use App\Event\ProjectMetaDefinitionEvent;
use App\Form\API\ProjectApiEditForm;
use App\Repository\ProjectRepository;
use App\Repository\Query\ProjectQuery;
@@ -23,7 +22,6 @@ use FOS\RestBundle\View\View;
use FOS\RestBundle\View\ViewHandlerInterface;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security;
use Swagger\Annotations as SWG;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
@@ -43,16 +41,11 @@ class ProjectController extends BaseApiController
* @var ViewHandlerInterface
*/
protected $viewHandler;
/**
* @var EventDispatcherInterface
*/
protected $dispatcher;
public function __construct(ViewHandlerInterface $viewHandler, ProjectRepository $repository, EventDispatcherInterface $dispatcher)
public function __construct(ViewHandlerInterface $viewHandler, ProjectRepository $repository)
{
$this->viewHandler = $viewHandler;
$this->repository = $repository;
$this->dispatcher = $dispatcher;
}
/**
@@ -126,11 +119,6 @@ class ProjectController extends BaseApiController
throw new NotFoundException();
}
// make sure the fields are properly setup and we know, which meta fields
// should be exposed and which not
$event = new ProjectMetaDefinitionEvent($data);
$this->dispatcher->dispatch(ProjectMetaDefinitionEvent::class, $event);
$view = new View($data, 200);
$view->getContext()->setGroups(['Default', 'Entity', 'Project']);