Remove no longer used annotation use statements and replace with attribute use statements

This commit is contained in:
2025-10-01 18:38:41 +02:00
parent d8528dceab
commit 32d2bb002b
486 changed files with 495 additions and 1063 deletions

View File

@@ -55,7 +55,7 @@ abstract class AbstractCRUDController extends AbstractController
$this->managerRegistry = $managerRegistry;
}
// public function __construct(protected readonly SerializerInterface $serializer, protected readonly ManagerRegistry $managerRegistry) {}
// public function __construct(protected readonly SerializerInterface $serializer, protected readonly ManagerRegistry $managerRegistry) {}
/**
* get the role given from the config.

View File

@@ -13,13 +13,11 @@ namespace Chill\MainBundle\CRUD\Controller;
use Chill\MainBundle\Pagination\PaginatorInterface;
use Chill\MainBundle\Serializer\Model\Collection;
use Doctrine\Persistence\ManagerRegistry;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
use Symfony\Component\Serializer\Exception\NotEncodableValueException;
use Symfony\Component\Serializer\Normalizer\AbstractNormalizer;
use Symfony\Component\Serializer\SerializerInterface;
use Symfony\Component\Validator\ConstraintViolationListInterface;
class ApiController extends AbstractCRUDController

View File

@@ -102,7 +102,7 @@ class CRUDController extends AbstractController
$this->managerRegistry = $managerRegistry;
}
// public function __construct(private readonly ManagerRegistry $managerRegistry) {}
// public function __construct(private readonly ManagerRegistry $managerRegistry) {}
public function CRUD(?string $parameter): Response
{
@@ -635,10 +635,10 @@ class CRUDController extends AbstractController
return $this->crudConfig['actions'][$action];
}
/* protected function getAuthorizationHelper(): AuthorizationHelper
{
return $this->container->get(AuthorizationHelper::class);
}*/
/* protected function getAuthorizationHelper(): AuthorizationHelper
{
return $this->container->get(AuthorizationHelper::class);
}*/
/**
* @return string the crud name
@@ -648,10 +648,10 @@ class CRUDController extends AbstractController
return $this->crudConfig['name'];
}
/* protected function getCrudResolver(): Resolver
{
return $this->get(Resolver::class);
}*/
/* protected function getCrudResolver(): Resolver
{
return $this->get(Resolver::class);
}*/
protected function getDefaultDeleteFormClass($action)
{
@@ -678,15 +678,15 @@ class CRUDController extends AbstractController
return $this->crudConfig['class'];
}
/* protected function getEventDispatcher(): EventDispatcherInterface
{
return $this->get(EventDispatcherInterface::class);
}*/
/* protected function getEventDispatcher(): EventDispatcherInterface
{
return $this->get(EventDispatcherInterface::class);
}*/
/* protected function getFilterOrderHelperFactory(): FilterOrderHelperFactoryInterface
{
return $this->get(FilterOrderHelperFactoryInterface::class);
}*/
/* protected function getFilterOrderHelperFactory(): FilterOrderHelperFactoryInterface
{
return $this->get(FilterOrderHelperFactoryInterface::class);
}*/
/**
* get the default form class from config.

View File

@@ -91,9 +91,6 @@ class Resolver
}
}
/**
* @return bool
*/
public function hasAction($crudName, $action): bool
{
return \array_key_exists(

View File

@@ -63,9 +63,6 @@ class TwigCRUDResolver extends AbstractExtension
];
}
/**
* @return bool
*/
public function hasAction($crudName, $action): bool
{
return $this->resolver->hasAction($crudName, $action);