mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2026-02-27 10:39:40 +00:00
Remove no longer used annotation use statements and replace with attribute use statements
This commit is contained in:
@@ -71,10 +71,10 @@ class EntityValueResolver implements ValueResolverInterface
|
||||
{
|
||||
// Common parameter naming patterns
|
||||
$possibleNames = [
|
||||
$name . 'Id',
|
||||
$name . '_id',
|
||||
$this->getShortClassName($type) . '_id',
|
||||
$this->getShortClassName($type) . 'Id',
|
||||
$name.'Id',
|
||||
$name.'_id',
|
||||
$this->getShortClassName($type).'_id',
|
||||
$this->getShortClassName($type).'Id',
|
||||
'id',
|
||||
];
|
||||
|
||||
@@ -111,6 +111,7 @@ class EntityValueResolver implements ValueResolverInterface
|
||||
private function getShortClassName(string $class): string
|
||||
{
|
||||
$parts = explode('\\', $class);
|
||||
|
||||
return end($parts);
|
||||
}
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -91,9 +91,6 @@ class Resolver
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function hasAction($crudName, $action): bool
|
||||
{
|
||||
return \array_key_exists(
|
||||
|
||||
@@ -63,9 +63,6 @@ class TwigCRUDResolver extends AbstractExtension
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function hasAction($crudName, $action): bool
|
||||
{
|
||||
return $this->resolver->hasAction($crudName, $action);
|
||||
|
||||
@@ -123,7 +123,7 @@ class ChillImportUsersCommand extends Command
|
||||
return $groupCenter;
|
||||
}
|
||||
|
||||
protected function createUser($offset, $data): \Chill\MainBundle\Entity\User
|
||||
protected function createUser($offset, $data): User
|
||||
{
|
||||
$user = new User();
|
||||
$user
|
||||
|
||||
@@ -54,9 +54,7 @@ class LoadCountriesCommand extends Command
|
||||
*
|
||||
* @see \Symfony\Component\Console\Command\Command::configure()
|
||||
*/
|
||||
protected function configure()
|
||||
{
|
||||
}
|
||||
protected function configure() {}
|
||||
|
||||
/**
|
||||
* (non-PHPdoc).
|
||||
|
||||
@@ -26,9 +26,7 @@ class LoadPostalCodeFR extends Command
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
public function configure(): void
|
||||
{
|
||||
}
|
||||
public function configure(): void {}
|
||||
|
||||
public function execute(InputInterface $input, OutputInterface $output): int
|
||||
{
|
||||
|
||||
@@ -15,7 +15,6 @@ use Chill\MainBundle\Form\AbsenceType;
|
||||
use Chill\MainBundle\Security\ChillSecurity;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
|
||||
class AbsenceController extends AbstractController
|
||||
{
|
||||
|
||||
@@ -13,13 +13,10 @@ namespace Chill\MainBundle\Controller;
|
||||
|
||||
use Chill\MainBundle\CRUD\Controller\ApiController;
|
||||
use Chill\MainBundle\Entity\Address;
|
||||
use Doctrine\Persistence\ManagerRegistry;
|
||||
use Symfony\Bridge\Doctrine\Attribute\MapEntity;
|
||||
use Symfony\Component\HttpFoundation\JsonResponse;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
use Symfony\Component\Serializer\Normalizer\AbstractNormalizer;
|
||||
use Symfony\Component\Serializer\SerializerInterface;
|
||||
|
||||
class AddressApiController extends ApiController
|
||||
{
|
||||
|
||||
@@ -22,7 +22,6 @@ use Symfony\Component\HttpFoundation\JsonResponse;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
use Symfony\Component\Serializer\Normalizer\AbstractNormalizer;
|
||||
|
||||
final class AddressReferenceAPIController extends ApiController
|
||||
|
||||
@@ -17,14 +17,13 @@ use Symfony\Bridge\Doctrine\Attribute\MapEntity;
|
||||
use Symfony\Component\HttpFoundation\JsonResponse;
|
||||
use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
|
||||
use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
use Symfony\Bundle\SecurityBundle\Security;
|
||||
use Symfony\Component\Serializer\Normalizer\AbstractNormalizer;
|
||||
use Symfony\Component\Serializer\SerializerInterface;
|
||||
|
||||
class AddressToReferenceMatcherController
|
||||
readonly class AddressToReferenceMatcherController
|
||||
{
|
||||
public function __construct(private readonly Security $security, private readonly EntityManagerInterface $entityManager, private readonly SerializerInterface $serializer) {}
|
||||
public function __construct(private Security $security, private EntityManagerInterface $entityManager, private SerializerInterface $serializer) {}
|
||||
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/api/1.0/main/address/reference-match/{id}/set/reviewed', methods: ['POST'])]
|
||||
public function markAddressAsReviewed(#[MapEntity(id: 'id')] Address $address): JsonResponse
|
||||
|
||||
@@ -12,7 +12,6 @@ declare(strict_types=1);
|
||||
namespace Chill\MainBundle\Controller;
|
||||
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
|
||||
class AdminController extends AbstractController
|
||||
{
|
||||
|
||||
@@ -11,10 +11,8 @@ declare(strict_types=1);
|
||||
|
||||
namespace Chill\MainBundle\Controller;
|
||||
|
||||
use Chill\MainBundle\Entity\User;
|
||||
use Chill\MainBundle\Repository\NewsItemRepository;
|
||||
use Symfony\Component\HttpFoundation\JsonResponse;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
|
||||
final readonly class DashboardApiController
|
||||
{
|
||||
|
||||
@@ -42,7 +42,7 @@ use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\HttpFoundation\Session\SessionInterface;
|
||||
use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
|
||||
use Symfony\Component\Messenger\MessageBusInterface;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
use Symfony\Component\Routing\Attribute\Route;
|
||||
use Symfony\Bundle\SecurityBundle\Security;
|
||||
|
||||
/**
|
||||
@@ -391,7 +391,7 @@ class ExportController extends AbstractController
|
||||
*
|
||||
* @return Response
|
||||
*/
|
||||
private function selectCentersStep(Request $request, DirectExportInterface|ExportInterface $export, $alias, ExportGeneration|SavedExport|null $savedExport = null): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
|
||||
private function selectCentersStep(Request $request, DirectExportInterface|ExportInterface $export, $alias, ExportGeneration|SavedExport|null $savedExport = null): \Symfony\Component\HttpFoundation\RedirectResponse|Response
|
||||
{
|
||||
if (!$this->filterStatsByCenters) {
|
||||
return $this->redirectToRoute('chill_main_export_new', [
|
||||
|
||||
@@ -16,7 +16,7 @@ use Chill\MainBundle\Export\ExportManager;
|
||||
use Symfony\Component\HttpFoundation\JsonResponse;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
use Symfony\Component\Routing\Attribute\Route;
|
||||
use Symfony\Bundle\SecurityBundle\Security;
|
||||
use Symfony\Component\Serializer\Normalizer\AbstractNormalizer;
|
||||
use Symfony\Component\Serializer\SerializerInterface;
|
||||
|
||||
@@ -21,7 +21,7 @@ use Symfony\Component\Clock\ClockInterface;
|
||||
use Symfony\Component\HttpFoundation\JsonResponse;
|
||||
use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
|
||||
use Symfony\Component\Messenger\MessageBusInterface;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
use Symfony\Component\Routing\Attribute\Route;
|
||||
use Symfony\Bundle\SecurityBundle\Security;
|
||||
use Symfony\Component\Serializer\SerializerInterface;
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ use Chill\MainBundle\Security\Authorization\ChillExportVoter;
|
||||
use Symfony\Bundle\SecurityBundle\Security;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
use Symfony\Component\Routing\Attribute\Route;
|
||||
use Twig\Environment;
|
||||
|
||||
final readonly class ExportIndexController
|
||||
|
||||
@@ -18,7 +18,6 @@ use Chill\MainBundle\Serializer\Model\Collection;
|
||||
use Symfony\Bridge\Doctrine\Attribute\MapEntity;
|
||||
use Symfony\Component\HttpFoundation\JsonResponse;
|
||||
use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
use Symfony\Bundle\SecurityBundle\Security;
|
||||
use Symfony\Component\Serializer\Normalizer\AbstractNormalizer;
|
||||
use Symfony\Component\Serializer\SerializerInterface;
|
||||
|
||||
@@ -37,7 +37,7 @@ class LocationApiController extends ApiController
|
||||
/**
|
||||
* @param QueryBuilder $query
|
||||
*/
|
||||
protected function orderQuery(string $action, $query, Request $request, PaginatorInterface $paginator, $_format): \Doctrine\ORM\QueryBuilder
|
||||
protected function orderQuery(string $action, $query, Request $request, PaginatorInterface $paginator, $_format): QueryBuilder
|
||||
{
|
||||
return $query
|
||||
->addOrderBy('e.name', 'ASC');
|
||||
|
||||
@@ -15,7 +15,6 @@ use Chill\MainBundle\Pagination\PaginatorFactory;
|
||||
use Chill\MainBundle\Repository\NewsItemRepository;
|
||||
use Chill\MainBundle\Serializer\Model\Collection;
|
||||
use Symfony\Component\HttpFoundation\JsonResponse;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
use Symfony\Component\Serializer\Normalizer\AbstractNormalizer;
|
||||
use Symfony\Component\Serializer\SerializerInterface;
|
||||
|
||||
|
||||
@@ -19,7 +19,6 @@ use Chill\MainBundle\Templating\Listing\FilterOrderHelperFactoryInterface;
|
||||
use Symfony\Bridge\Doctrine\Attribute\MapEntity;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
use Twig\Environment;
|
||||
use Twig\Error\LoaderError;
|
||||
use Twig\Error\RuntimeError;
|
||||
|
||||
@@ -22,15 +22,14 @@ use Doctrine\ORM\EntityManagerInterface;
|
||||
use Symfony\Bridge\Doctrine\Attribute\MapEntity;
|
||||
use Symfony\Component\HttpFoundation\JsonResponse;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
use Symfony\Component\Security\Core\Exception\AccessDeniedException;
|
||||
use Symfony\Bundle\SecurityBundle\Security;
|
||||
use Symfony\Component\Serializer\SerializerInterface;
|
||||
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/api/1.0/main/notification')]
|
||||
class NotificationApiController
|
||||
readonly class NotificationApiController
|
||||
{
|
||||
public function __construct(private readonly EntityManagerInterface $entityManager, private readonly NotificationRepository $notificationRepository, private readonly PaginatorFactory $paginatorFactory, private readonly Security $security, private readonly SerializerInterface $serializer) {}
|
||||
public function __construct(private EntityManagerInterface $entityManager, private NotificationRepository $notificationRepository, private PaginatorFactory $paginatorFactory, private Security $security, private SerializerInterface $serializer) {}
|
||||
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{id}/mark/read', name: 'chill_api_main_notification_mark_read', methods: ['POST'])]
|
||||
public function markAsRead(#[MapEntity(id: 'id')] Notification $notification): JsonResponse
|
||||
|
||||
@@ -33,7 +33,6 @@ use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
|
||||
use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
|
||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
use function in_array;
|
||||
|
||||
|
||||
@@ -26,7 +26,6 @@ use Symfony\Component\Form\Extension\Core\Type\TextType;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
use Symfony\Component\Validator\Constraints\Callback;
|
||||
use Symfony\Component\Validator\Context\ExecutionContextInterface;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
@@ -41,11 +40,8 @@ final class PasswordController extends AbstractController
|
||||
*/
|
||||
public function __construct(private readonly LoggerInterface $chillLogger, private readonly \Symfony\Component\PasswordHasher\Hasher\UserPasswordHasherInterface $passwordEncoder, private readonly RecoverPasswordHelper $recoverPasswordHelper, private readonly TokenManager $tokenManager, private readonly TranslatorInterface $translator, private readonly EventDispatcherInterface $eventDispatcher, private readonly ChillSecurity $security, private readonly \Doctrine\Persistence\ManagerRegistry $managerRegistry) {}
|
||||
|
||||
/**
|
||||
* @return Response
|
||||
*/
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/public/{_locale}/password/request-changed', name: 'password_request_recover_changed')]
|
||||
public function changeConfirmedAction(): \Symfony\Component\HttpFoundation\Response
|
||||
public function changeConfirmedAction(): Response
|
||||
{
|
||||
return $this->render('@ChillMain/Password/recover_password_changed.html.twig');
|
||||
}
|
||||
@@ -186,11 +182,8 @@ final class PasswordController extends AbstractController
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Response
|
||||
*/
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/public/{_locale}/password/request-confirm', name: 'password_request_recover_confirm')]
|
||||
public function requestRecoverConfirmAction(): \Symfony\Component\HttpFoundation\Response
|
||||
public function requestRecoverConfirmAction(): Response
|
||||
{
|
||||
return $this->render('@ChillMain/Password/request_recover_password_confirm.html.twig');
|
||||
}
|
||||
@@ -199,7 +192,7 @@ final class PasswordController extends AbstractController
|
||||
* @return Response
|
||||
*/
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/my/password', name: 'change_my_password')]
|
||||
public function UserPasswordAction(Request $request): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
|
||||
public function UserPasswordAction(Request $request): \Symfony\Component\HttpFoundation\RedirectResponse|Response
|
||||
{
|
||||
if (!$this->security->isGranted('ROLE_USER')) {
|
||||
throw new AccessDeniedHttpException();
|
||||
@@ -243,9 +236,6 @@ final class PasswordController extends AbstractController
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Symfony\Component\Form\FormInterface
|
||||
*/
|
||||
protected function requestRecoverForm(): \Symfony\Component\Form\FormInterface
|
||||
{
|
||||
$builder = $this->createFormBuilder();
|
||||
@@ -277,9 +267,6 @@ final class PasswordController extends AbstractController
|
||||
return $builder->getForm();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Symfony\Component\Form\FormInterface
|
||||
*/
|
||||
private function passwordForm(User $user): \Symfony\Component\Form\FormInterface
|
||||
{
|
||||
return $this
|
||||
|
||||
@@ -15,7 +15,6 @@ use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
use Symfony\Component\HttpFoundation\JsonResponse;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
use Symfony\Bundle\SecurityBundle\Security;
|
||||
use Symfony\Component\Serializer\Normalizer\DenormalizerInterface;
|
||||
|
||||
|
||||
@@ -26,7 +26,6 @@ use Symfony\Component\Form\Extension\Core\Type\SubmitType;
|
||||
use Symfony\Component\Form\FormInterface;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
use Symfony\Component\Security\Core\Role\RoleHierarchyInterface;
|
||||
use Symfony\Component\Validator\Validator\ValidatorInterface;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
|
||||
@@ -21,7 +21,6 @@ use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
|
||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
use Symfony\Component\Serializer\Normalizer\AbstractNormalizer;
|
||||
|
||||
final class PostalCodeAPIController extends ApiController
|
||||
|
||||
@@ -17,7 +17,6 @@ use Doctrine\ORM\Query;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
use Symfony\Component\HttpFoundation\JsonResponse;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
|
||||
/**
|
||||
* Class PostalCodeController.
|
||||
|
||||
@@ -29,7 +29,7 @@ use Symfony\Component\HttpFoundation\RequestStack;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\HttpFoundation\Session\Session;
|
||||
use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
use Symfony\Component\Routing\Attribute\Route;
|
||||
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
|
||||
use Symfony\Bundle\SecurityBundle\Security;
|
||||
use Symfony\Component\Translation\TranslatableMessage;
|
||||
|
||||
@@ -24,7 +24,7 @@ use Chill\MainBundle\Templating\Listing\FilterOrderHelper;
|
||||
use Chill\MainBundle\Templating\Listing\FilterOrderHelperFactoryInterface;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
use Symfony\Component\Routing\Attribute\Route;
|
||||
use Symfony\Bundle\SecurityBundle\Security;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
|
||||
|
||||
@@ -20,7 +20,6 @@ use Symfony\Component\Form\Extension\Core\Type\SubmitType;
|
||||
use Symfony\Component\Form\FormInterface;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
|
||||
/**
|
||||
* Class ScopeController.
|
||||
@@ -36,7 +35,7 @@ class ScopeController extends AbstractController
|
||||
* Creates a new Scope entity.
|
||||
*/
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/admin/scope/create', name: 'admin_scope_create', methods: ['POST'])]
|
||||
public function createAction(Request $request): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
|
||||
public function createAction(Request $request): \Symfony\Component\HttpFoundation\RedirectResponse|Response
|
||||
{
|
||||
$scope = new Scope();
|
||||
$form = $this->createCreateForm($scope);
|
||||
@@ -81,7 +80,7 @@ class ScopeController extends AbstractController
|
||||
* Lists all Scope entities.
|
||||
*/
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/admin/scope/', name: 'admin_scope')]
|
||||
public function indexAction(): \Symfony\Component\HttpFoundation\Response
|
||||
public function indexAction(): Response
|
||||
{
|
||||
$em = $this->managerRegistry->getManager();
|
||||
|
||||
@@ -96,7 +95,7 @@ class ScopeController extends AbstractController
|
||||
* Displays a form to create a new Scope entity.
|
||||
*/
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/admin/scope/new', name: 'admin_scope_new')]
|
||||
public function newAction(): \Symfony\Component\HttpFoundation\Response
|
||||
public function newAction(): Response
|
||||
{
|
||||
$scope = new Scope();
|
||||
$form = $this->createCreateForm($scope);
|
||||
@@ -110,7 +109,7 @@ class ScopeController extends AbstractController
|
||||
/**
|
||||
* Finds and displays a Scope entity.
|
||||
*/
|
||||
public function showAction(mixed $id): \Symfony\Component\HttpFoundation\Response
|
||||
public function showAction(mixed $id): Response
|
||||
{
|
||||
$em = $this->managerRegistry->getManager();
|
||||
|
||||
|
||||
@@ -15,7 +15,6 @@ use Chill\MainBundle\Pagination\PaginatorFactory;
|
||||
use Chill\MainBundle\Timeline\TimelineBuilder;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
use Symfony\Bundle\SecurityBundle\Security;
|
||||
|
||||
class TimelineCenterController extends AbstractController
|
||||
|
||||
@@ -18,7 +18,6 @@ use Doctrine\ORM\QueryBuilder;
|
||||
use Symfony\Component\HttpFoundation\JsonResponse;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
|
||||
class UserApiController extends ApiController
|
||||
{
|
||||
|
||||
@@ -24,7 +24,6 @@ use Chill\MainBundle\Pagination\PaginatorInterface;
|
||||
use Chill\MainBundle\Repository\UserRepository;
|
||||
use Chill\MainBundle\Security\ChillSecurity;
|
||||
use Chill\MainBundle\Templating\Listing\FilterOrderHelper;
|
||||
use Doctrine\Persistence\ManagerRegistry;
|
||||
use Psr\Log\LoggerInterface;
|
||||
use Symfony\Bridge\Doctrine\Attribute\MapEntity;
|
||||
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
|
||||
@@ -34,7 +33,6 @@ use Symfony\Component\Form\FormInterface;
|
||||
use Symfony\Component\HttpFoundation\RedirectResponse;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
use Symfony\Component\Validator\Validator\ValidatorInterface;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
|
||||
|
||||
@@ -17,7 +17,6 @@ use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\HttpFoundation\StreamedResponse;
|
||||
use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
use Symfony\Bundle\SecurityBundle\Security;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
|
||||
|
||||
@@ -29,7 +29,6 @@ use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\HttpFoundation\Session\Session;
|
||||
use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
use Symfony\Bundle\SecurityBundle\Security;
|
||||
use Symfony\Component\Translation\TranslatableMessage;
|
||||
use Twig\Environment;
|
||||
|
||||
@@ -15,7 +15,6 @@ use Chill\MainBundle\Entity\User;
|
||||
use Symfony\Bridge\Doctrine\Attribute\MapEntity;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
use Twig\Environment;
|
||||
|
||||
class UserJobScopeHistoriesController extends AbstractController
|
||||
|
||||
@@ -17,7 +17,6 @@ use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
|
||||
final class UserProfileController extends AbstractController
|
||||
{
|
||||
|
||||
@@ -21,7 +21,6 @@ use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
|
||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
|
||||
use Symfony\Bundle\SecurityBundle\Security;
|
||||
use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
|
||||
|
||||
@@ -23,7 +23,6 @@ use Symfony\Component\HttpFoundation\JsonResponse;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
use Symfony\Component\Security\Core\Exception\AccessDeniedException;
|
||||
use Symfony\Bundle\SecurityBundle\Security;
|
||||
use Symfony\Component\Serializer\SerializerInterface;
|
||||
|
||||
@@ -21,7 +21,6 @@ use Symfony\Component\HttpFoundation\JsonResponse;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
use Symfony\Bundle\SecurityBundle\Security;
|
||||
use Symfony\Component\Serializer\Normalizer\AbstractNormalizer;
|
||||
use Symfony\Component\Serializer\SerializerInterface;
|
||||
|
||||
@@ -35,7 +35,6 @@ use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
|
||||
use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
|
||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
use Symfony\Component\Validator\Validator\ValidatorInterface;
|
||||
use Symfony\Component\Workflow\Registry;
|
||||
use Symfony\Component\Workflow\TransitionBlocker;
|
||||
|
||||
@@ -21,7 +21,6 @@ use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
|
||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
|
||||
use Symfony\Bundle\SecurityBundle\Security;
|
||||
use Symfony\Component\Workflow\Registry;
|
||||
|
||||
@@ -22,7 +22,6 @@ use Symfony\Component\HttpFoundation\RedirectResponse;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
use Symfony\Bundle\SecurityBundle\Security;
|
||||
use Twig\Environment;
|
||||
|
||||
|
||||
@@ -24,7 +24,6 @@ use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
|
||||
use Symfony\Component\Messenger\MessageBusInterface;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
use Twig\Environment;
|
||||
|
||||
final readonly class WorkflowViewSendPublicController
|
||||
|
||||
@@ -13,22 +13,22 @@ namespace Chill\MainBundle\DataFixtures\ORM;
|
||||
|
||||
use Chill\MainBundle\Command\LoadCountriesCommand;
|
||||
use Doctrine\Bundle\FixturesBundle\Fixture;
|
||||
use Doctrine\Common\DataFixtures\AbstractFixture;
|
||||
use Doctrine\Common\DataFixtures\OrderedFixtureInterface;
|
||||
use Doctrine\Persistence\ObjectManager;
|
||||
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
|
||||
|
||||
|
||||
/**
|
||||
* Load countries into database.
|
||||
*/
|
||||
class LoadCountries extends Fixture implements OrderedFixtureInterface
|
||||
{
|
||||
private array $availableLanguages;
|
||||
|
||||
public function __construct(private readonly ParameterBagInterface $parameterBag)
|
||||
{
|
||||
$this->availableLanguages = $this->parameterBag->get('chill_main.available_languages');
|
||||
}
|
||||
|
||||
public function getOrder(): int
|
||||
{
|
||||
return 20;
|
||||
|
||||
@@ -31,6 +31,7 @@ class LoadLanguages extends Fixture implements OrderedFixtureInterface
|
||||
private array $regionalVersionToInclude = ['ro_MD'];
|
||||
|
||||
private array $availableLanguages;
|
||||
|
||||
public function __construct(private readonly ParameterBagInterface $parameterBag)
|
||||
{
|
||||
$this->availableLanguages = $this->parameterBag->get('chill_main.available_languages');
|
||||
|
||||
@@ -31,7 +31,7 @@ class Configuration implements ConfigurationInterface
|
||||
$this->setWidgetFactories($widgetFactories);
|
||||
}
|
||||
|
||||
public function getConfigTreeBuilder(): \Symfony\Component\Config\Definition\Builder\TreeBuilder
|
||||
public function getConfigTreeBuilder(): TreeBuilder
|
||||
{
|
||||
$treeBuilder = new TreeBuilder('chill_main');
|
||||
$rootNode = $treeBuilder->getRootNode();
|
||||
|
||||
@@ -18,7 +18,6 @@ use Doctrine\Common\EventSubscriber;
|
||||
use Doctrine\ORM\Event\PrePersistEventArgs;
|
||||
use Doctrine\ORM\Event\PreUpdateEventArgs;
|
||||
use Doctrine\ORM\Events;
|
||||
use Doctrine\Persistence\Event\LifecycleEventArgs;
|
||||
use Symfony\Bundle\SecurityBundle\Security;
|
||||
|
||||
class TrackCreateUpdateSubscriber implements EventSubscriber
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace Chill\MainBundle\Doctrine\Model;
|
||||
|
||||
use Chill\MainBundle\Entity\User;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Component\Serializer\Annotation as Serializer;
|
||||
use Symfony\Component\Serializer\Attribute as Serializer;
|
||||
|
||||
trait TrackCreationTrait
|
||||
{
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace Chill\MainBundle\Doctrine\Model;
|
||||
|
||||
use Chill\MainBundle\Entity\User;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Component\Serializer\Annotation as Serializer;
|
||||
use Symfony\Component\Serializer\Attribute as Serializer;
|
||||
|
||||
trait TrackUpdateTrait
|
||||
{
|
||||
|
||||
@@ -20,7 +20,7 @@ use Chill\ThirdPartyBundle\Entity\ThirdParty;
|
||||
use Doctrine\Common\Collections\ArrayCollection;
|
||||
use Doctrine\Common\Collections\Collection;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Component\Serializer\Annotation\Groups;
|
||||
use Symfony\Component\Serializer\Attribute\Groups;
|
||||
use Symfony\Component\Validator\Context\ExecutionContextInterface;
|
||||
|
||||
/**
|
||||
@@ -271,8 +271,6 @@ class Address implements TrackCreationInterface, TrackUpdateInterface
|
||||
|
||||
/**
|
||||
* Get id.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getId(): ?int
|
||||
{
|
||||
@@ -289,7 +287,7 @@ class Address implements TrackCreationInterface, TrackUpdateInterface
|
||||
return $this->isNoAddress;
|
||||
}
|
||||
|
||||
public function getLinkedToThirdParty(): ?\Chill\ThirdPartyBundle\Entity\ThirdParty
|
||||
public function getLinkedToThirdParty(): ?ThirdParty
|
||||
{
|
||||
return $this->linkedToThirdParty;
|
||||
}
|
||||
@@ -330,8 +328,6 @@ class Address implements TrackCreationInterface, TrackUpdateInterface
|
||||
/**
|
||||
* Get streetAddress1 (legacy function).
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
public function getStreetAddress1(): string
|
||||
@@ -342,8 +338,6 @@ class Address implements TrackCreationInterface, TrackUpdateInterface
|
||||
/**
|
||||
* Get streetAddress2 (legacy function).
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
public function getStreetAddress2(): string
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace Chill\MainBundle\Entity;
|
||||
|
||||
use Chill\MainBundle\Doctrine\Model\Point;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Component\Serializer\Annotation\Groups;
|
||||
use Symfony\Component\Serializer\Attribute\Groups;
|
||||
|
||||
#[ORM\Entity]
|
||||
#[ORM\HasLifecycleCallbacks]
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace Chill\MainBundle\Entity;
|
||||
use Doctrine\Common\Collections\ArrayCollection;
|
||||
use Doctrine\Common\Collections\Collection;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Component\Serializer\Annotation as Serializer;
|
||||
use Symfony\Component\Serializer\Attribute as Serializer;
|
||||
|
||||
#[ORM\Entity]
|
||||
#[ORM\Table(name: 'centers')]
|
||||
@@ -87,9 +87,6 @@ class Center implements HasCenterInterface, \Stringable
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getName(): string
|
||||
{
|
||||
return $this->name;
|
||||
|
||||
@@ -12,7 +12,7 @@ declare(strict_types=1);
|
||||
namespace Chill\MainBundle\Entity;
|
||||
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Component\Serializer\Annotation as Serializer;
|
||||
use Symfony\Component\Serializer\Attribute as Serializer;
|
||||
|
||||
#[Serializer\DiscriminatorMap(typeProperty: 'type', mapping: ['chill_main_civility' => Civility::class])]
|
||||
#[ORM\Entity]
|
||||
|
||||
@@ -12,8 +12,9 @@ declare(strict_types=1);
|
||||
namespace Chill\MainBundle\Entity;
|
||||
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Component\Serializer\Annotation\Context;
|
||||
use Symfony\Component\Serializer\Annotation\Groups;
|
||||
use Symfony\Component\Serializer\Attribute\Context;
|
||||
|
||||
use Symfony\Component\Serializer\Attribute\Groups;
|
||||
|
||||
/**
|
||||
* Country.
|
||||
|
||||
@@ -12,7 +12,7 @@ declare(strict_types=1);
|
||||
namespace Chill\MainBundle\Entity;
|
||||
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Component\Serializer\Annotation as Serializer;
|
||||
use Symfony\Component\Serializer\Attribute as Serializer;
|
||||
use Symfony\Component\Validator\Constraints as Assert;
|
||||
|
||||
#[ORM\Entity]
|
||||
|
||||
@@ -33,9 +33,6 @@ class CommentEmbeddable
|
||||
return $this->comment;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \DateTime
|
||||
*/
|
||||
public function getDate(): ?\DateTime
|
||||
{
|
||||
return $this->date;
|
||||
|
||||
@@ -17,7 +17,7 @@ use Chill\MainBundle\Doctrine\Model\TrackCreationTrait;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Ramsey\Uuid\Uuid;
|
||||
use Ramsey\Uuid\UuidInterface;
|
||||
use Symfony\Component\Serializer\Annotation as Serializer;
|
||||
use Symfony\Component\Serializer\Attribute as Serializer;
|
||||
|
||||
/**
|
||||
* Contains the single execution of an export.
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace Chill\MainBundle\Entity;
|
||||
|
||||
use Chill\MainBundle\Repository\GenderRepository;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Component\Serializer\Annotation as Serializer;
|
||||
use Symfony\Component\Serializer\Attribute as Serializer;
|
||||
use Symfony\Component\Validator\Constraints as Assert;
|
||||
|
||||
#[Serializer\DiscriminatorMap(typeProperty: 'type', mapping: ['chill_main_gender' => Gender::class])]
|
||||
|
||||
@@ -11,7 +11,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace Chill\MainBundle\Entity\GeographicalUnit;
|
||||
|
||||
use Symfony\Component\Serializer\Annotation as Serializer;
|
||||
use Symfony\Component\Serializer\Attribute as Serializer;
|
||||
|
||||
/**
|
||||
* Simple GeographialUnit Data Transfer Object.
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace Chill\MainBundle\Entity;
|
||||
use Doctrine\Common\Collections\ArrayCollection;
|
||||
use Doctrine\Common\Collections\Collection;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Component\Serializer\Annotation as Serializer;
|
||||
use Symfony\Component\Serializer\Attribute as Serializer;
|
||||
|
||||
#[ORM\Entity]
|
||||
#[ORM\Table(name: 'chill_main_geographical_unit_layer')]
|
||||
|
||||
@@ -12,7 +12,7 @@ declare(strict_types=1);
|
||||
namespace Chill\MainBundle\Entity;
|
||||
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Component\Serializer\Annotation as Serializer;
|
||||
use Symfony\Component\Serializer\Attribute as Serializer;
|
||||
|
||||
/**
|
||||
* Language.
|
||||
@@ -38,8 +38,6 @@ class Language
|
||||
|
||||
/**
|
||||
* Get id.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getId(): ?string
|
||||
{
|
||||
|
||||
@@ -17,8 +17,8 @@ use Chill\MainBundle\Repository\LocationRepository;
|
||||
use Chill\MainBundle\Validation\Constraint\PhonenumberConstraint;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use libphonenumber\PhoneNumber;
|
||||
use Symfony\Component\Serializer\Annotation as Serializer;
|
||||
use Symfony\Component\Serializer\Annotation\DiscriminatorMap;
|
||||
use Symfony\Component\Serializer\Attribute as Serializer;
|
||||
use Symfony\Component\Serializer\Attribute\DiscriminatorMap;
|
||||
|
||||
#[DiscriminatorMap(typeProperty: 'type', mapping: ['location' => Location::class])]
|
||||
#[ORM\Entity(repositoryClass: LocationRepository::class)]
|
||||
|
||||
@@ -14,8 +14,8 @@ namespace Chill\MainBundle\Entity;
|
||||
use Chill\MainBundle\Repository\LocationTypeRepository;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
|
||||
use Symfony\Component\Serializer\Annotation as Serializer;
|
||||
use Symfony\Component\Serializer\Annotation\DiscriminatorMap;
|
||||
use Symfony\Component\Serializer\Attribute as Serializer;
|
||||
use Symfony\Component\Serializer\Attribute\DiscriminatorMap;
|
||||
|
||||
#[DiscriminatorMap(typeProperty: 'type', mapping: ['location-type' => LocationType::class])]
|
||||
#[UniqueEntity(['defaultFor'])]
|
||||
|
||||
@@ -16,7 +16,7 @@ use Chill\MainBundle\Doctrine\Model\TrackCreationTrait;
|
||||
use Chill\MainBundle\Doctrine\Model\TrackUpdateInterface;
|
||||
use Chill\MainBundle\Doctrine\Model\TrackUpdateTrait;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Component\Serializer\Annotation\Groups;
|
||||
use Symfony\Component\Serializer\Attribute\Groups;
|
||||
use Symfony\Component\Validator\Constraints as Assert;
|
||||
|
||||
#[ORM\Entity]
|
||||
|
||||
@@ -28,7 +28,7 @@ class Notification implements TrackUpdateInterface
|
||||
{
|
||||
use TrackUpdateTrait;
|
||||
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::TEXT, nullable: false)]
|
||||
#[ORM\Column(type: Types::TEXT, nullable: false)]
|
||||
private string $accessKey;
|
||||
|
||||
private array $addedAddresses = [];
|
||||
|
||||
@@ -70,17 +70,11 @@ class PermissionsGroup
|
||||
return $this->flags;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getId(): ?int
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getName(): string
|
||||
{
|
||||
return $this->name;
|
||||
|
||||
@@ -17,7 +17,7 @@ use Chill\MainBundle\Doctrine\Model\TrackCreationTrait;
|
||||
use Chill\MainBundle\Doctrine\Model\TrackUpdateInterface;
|
||||
use Chill\MainBundle\Doctrine\Model\TrackUpdateTrait;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Component\Serializer\Annotation\Groups;
|
||||
use Symfony\Component\Serializer\Attribute\Groups;
|
||||
|
||||
/**
|
||||
* PostalCode.
|
||||
@@ -89,8 +89,6 @@ class PostalCode implements TrackUpdateInterface, TrackCreationInterface
|
||||
|
||||
/**
|
||||
* Get code.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getCode(): ?string
|
||||
{
|
||||
@@ -99,18 +97,14 @@ class PostalCode implements TrackUpdateInterface, TrackCreationInterface
|
||||
|
||||
/**
|
||||
* Get country.
|
||||
*
|
||||
* @return Country
|
||||
*/
|
||||
public function getCountry(): ?\Chill\MainBundle\Entity\Country
|
||||
public function getCountry(): ?Country
|
||||
{
|
||||
return $this->country;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get id.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getId(): ?int
|
||||
{
|
||||
@@ -119,8 +113,6 @@ class PostalCode implements TrackUpdateInterface, TrackCreationInterface
|
||||
|
||||
/**
|
||||
* Get name.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getName(): ?string
|
||||
{
|
||||
@@ -129,8 +121,6 @@ class PostalCode implements TrackUpdateInterface, TrackCreationInterface
|
||||
|
||||
/**
|
||||
* Get origin.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getOrigin(): int
|
||||
{
|
||||
|
||||
@@ -14,9 +14,10 @@ namespace Chill\MainBundle\Entity;
|
||||
use Doctrine\Common\Collections\ArrayCollection;
|
||||
use Doctrine\Common\Collections\Collection;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Component\Serializer\Annotation\Context;
|
||||
use Symfony\Component\Serializer\Annotation\DiscriminatorMap;
|
||||
use Symfony\Component\Serializer\Annotation\Groups;
|
||||
use Symfony\Component\Serializer\Attribute\Context;
|
||||
|
||||
use Symfony\Component\Serializer\Attribute\DiscriminatorMap;
|
||||
use Symfony\Component\Serializer\Attribute\Groups;
|
||||
|
||||
#[DiscriminatorMap(typeProperty: 'type', mapping: ['scope' => Scope::class])]
|
||||
#[ORM\Entity]
|
||||
|
||||
@@ -21,7 +21,7 @@ use Doctrine\ORM\Mapping as ORM;
|
||||
use libphonenumber\PhoneNumber;
|
||||
use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface;
|
||||
use Symfony\Component\Security\Core\User\UserInterface;
|
||||
use Symfony\Component\Serializer\Annotation as Serializer;
|
||||
use Symfony\Component\Serializer\Attribute as Serializer;
|
||||
use Symfony\Component\Validator\Context\ExecutionContextInterface;
|
||||
use Chill\MainBundle\Validation\Constraint\PhonenumberConstraint;
|
||||
use Symfony\Component\Validator\Constraints as Assert;
|
||||
@@ -167,8 +167,6 @@ class User implements UserInterface, \Stringable, PasswordAuthenticatedUserInter
|
||||
|
||||
/**
|
||||
* Get attributes.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getAttributes(): array
|
||||
{
|
||||
@@ -194,9 +192,6 @@ class User implements UserInterface, \Stringable, PasswordAuthenticatedUserInter
|
||||
return $this->email;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getEmailCanonical(): ?string
|
||||
{
|
||||
return $this->emailCanonical;
|
||||
@@ -321,9 +316,6 @@ class User implements UserInterface, \Stringable, PasswordAuthenticatedUserInter
|
||||
return new ArrayCollection($sortedJobHistories);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getUsername(): string
|
||||
{
|
||||
return $this->username;
|
||||
@@ -334,9 +326,6 @@ class User implements UserInterface, \Stringable, PasswordAuthenticatedUserInter
|
||||
return $this->username;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getUsernameCanonical(): ?string
|
||||
{
|
||||
return $this->usernameCanonical;
|
||||
@@ -361,9 +350,6 @@ class User implements UserInterface, \Stringable, PasswordAuthenticatedUserInter
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function isAccountNonLocked(): bool
|
||||
{
|
||||
return $this->locked;
|
||||
@@ -377,9 +363,6 @@ class User implements UserInterface, \Stringable, PasswordAuthenticatedUserInter
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function isEnabled(): bool
|
||||
{
|
||||
return $this->enabled;
|
||||
|
||||
@@ -18,7 +18,7 @@ use Doctrine\Common\Collections\Order;
|
||||
use Doctrine\Common\Collections\ReadableCollection;
|
||||
use Doctrine\Common\Collections\Selectable;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Component\Serializer\Annotation\DiscriminatorMap;
|
||||
use Symfony\Component\Serializer\Attribute\DiscriminatorMap;
|
||||
use Symfony\Component\Validator\Constraints as Assert;
|
||||
|
||||
/**
|
||||
|
||||
@@ -12,7 +12,7 @@ declare(strict_types=1);
|
||||
namespace Chill\MainBundle\Entity;
|
||||
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Component\Serializer\Annotation as Serializer;
|
||||
use Symfony\Component\Serializer\Attribute as Serializer;
|
||||
|
||||
#[Serializer\DiscriminatorMap(typeProperty: 'type', mapping: ['user_job' => UserJob::class])]
|
||||
#[ORM\Entity]
|
||||
|
||||
@@ -22,7 +22,7 @@ use Doctrine\Common\Collections\ArrayCollection;
|
||||
use Doctrine\Common\Collections\Collection;
|
||||
use Doctrine\Common\Collections\Selectable;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Component\Serializer\Annotation as Serializer;
|
||||
use Symfony\Component\Serializer\Attribute as Serializer;
|
||||
use Symfony\Component\Validator\Constraints as Assert;
|
||||
|
||||
#[Serializer\DiscriminatorMap(typeProperty: 'type', mapping: ['entity_workflow' => EntityWorkflow::class])]
|
||||
|
||||
@@ -119,7 +119,7 @@ class CSVFormatter implements FormatterInterface
|
||||
array $exportData,
|
||||
array $filtersData,
|
||||
array $aggregatorsData,
|
||||
): \Symfony\Component\HttpFoundation\Response {
|
||||
): Response {
|
||||
$this->result = $result;
|
||||
$this->orderingHeaders($formatterData);
|
||||
$this->export = $this->exportManager->getExport($exportAlias);
|
||||
|
||||
@@ -101,7 +101,7 @@ final class SpreadSheetFormatter implements FormatterInterface, ExportManagerAwa
|
||||
array $filtersData,
|
||||
array $aggregatorsData,
|
||||
ExportGenerationContext $context,
|
||||
): \Chill\MainBundle\Export\FormattedExportGeneration {
|
||||
): FormattedExportGeneration {
|
||||
// Initialize local variables instead of class properties
|
||||
/** @var ExportInterface $export */
|
||||
$export = $this->getExportManager()->getExport($exportAlias);
|
||||
|
||||
@@ -195,7 +195,7 @@ class SpreadsheetListFormatter implements FormatterInterface, ExportManagerAware
|
||||
array $filtersData,
|
||||
array $aggregatorsData,
|
||||
ExportGenerationContext $context,
|
||||
): \Symfony\Component\HttpFoundation\BinaryFileResponse {
|
||||
): BinaryFileResponse {
|
||||
$generated = $this->generate($result, $formatterData, $exportAlias, $exportData, $filtersData, $aggregatorsData, $context);
|
||||
|
||||
$response = new BinaryFileResponse($generated->content);
|
||||
|
||||
@@ -52,8 +52,6 @@ class PostalCodeChoiceLoader implements ChoiceLoaderInterface
|
||||
|
||||
/**
|
||||
* @param null $value
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function loadChoicesForValues(array $values, $value = null): array
|
||||
{
|
||||
|
||||
@@ -70,9 +70,6 @@ final class LocationFormType extends AbstractType
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getBlockPrefix(): string
|
||||
{
|
||||
return 'chill_mainbundle_location';
|
||||
|
||||
@@ -47,9 +47,6 @@ class NewsItemType extends AbstractType
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function configureOptions(OptionsResolver $resolver): void
|
||||
{
|
||||
$resolver->setDefault('data_class', NewsItem::class);
|
||||
|
||||
@@ -60,9 +60,6 @@ class PermissionsGroupType extends AbstractType
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getBlockPrefix(): string
|
||||
{
|
||||
return 'chill_mainbundle_permissionsgroup';
|
||||
|
||||
@@ -40,9 +40,6 @@ class ScopeType extends AbstractType
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getBlockPrefix(): string
|
||||
{
|
||||
return 'chill_mainbundle_scope';
|
||||
|
||||
@@ -55,6 +55,7 @@ class EntityToJsonTransformer implements DataTransformerInterface
|
||||
|
||||
/**
|
||||
* @param User|User[] $value
|
||||
*
|
||||
* @throws ExceptionInterface
|
||||
*/
|
||||
public function transform(mixed $value): mixed
|
||||
|
||||
@@ -100,9 +100,6 @@ class UserPasswordType extends AbstractType
|
||||
->setAllowedTypes('user', \Chill\MainBundle\Entity\User::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getBlockPrefix(): string
|
||||
{
|
||||
return 'chill_mainbundle_user_password';
|
||||
|
||||
@@ -169,9 +169,6 @@ class UserType extends AbstractType
|
||||
->addAllowedValues('is_creation', [true, false]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getBlockPrefix(): string
|
||||
{
|
||||
return 'chill_mainbundle_user';
|
||||
|
||||
@@ -11,7 +11,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace Chill\MainBundle\Search;
|
||||
|
||||
use Symfony\Component\Serializer\Annotation as Serializer;
|
||||
use Symfony\Component\Serializer\Attribute as Serializer;
|
||||
|
||||
class SearchApiResult
|
||||
{
|
||||
|
||||
@@ -211,8 +211,6 @@ class SearchProvider
|
||||
* extract default (residual) arguments.
|
||||
*
|
||||
* @param string $subject
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
private function extractDefault($subject): string
|
||||
{
|
||||
|
||||
@@ -37,9 +37,6 @@ class PasswordRecoverEvent extends \Symfony\Contracts\EventDispatcher\Event
|
||||
return $this->ip;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getToken(): ?string
|
||||
{
|
||||
return $this->token;
|
||||
|
||||
@@ -25,8 +25,6 @@ class RecoverPasswordHelper
|
||||
/**
|
||||
* @param bool $absolute
|
||||
* @param array $parameters additional parameters to url
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function generateUrl(User $user, \DateTimeInterface $expiration, $absolute = true, array $parameters = []): string
|
||||
{
|
||||
|
||||
@@ -26,9 +26,6 @@ final class ResolverTwigExtension extends \Twig\Extension\AbstractExtension
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function isScopeConcerned($entity, ?array $options = []): bool
|
||||
{
|
||||
return $this->scopeResolverDispatcher->isConcerned($entity, $options);
|
||||
|
||||
@@ -1,4 +1,14 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* Chill is a software for social workers
|
||||
*
|
||||
* For the full copyright and license information, please view
|
||||
* the LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Chill\MainBundle\Serializer;
|
||||
|
||||
class CircularReferenceHandler
|
||||
|
||||
@@ -20,7 +20,6 @@ namespace Chill\MainBundle\Service\ShortMessage;
|
||||
|
||||
use libphonenumber\PhoneNumberFormat;
|
||||
use libphonenumber\PhoneNumberUtil;
|
||||
use Symfony\Component\Messenger\Handler\MessageHandlerInterface;
|
||||
use Symfony\Component\Notifier\Message\SmsMessage;
|
||||
use Symfony\Component\Notifier\TexterInterface;
|
||||
|
||||
@@ -31,10 +30,12 @@ use Symfony\Component\Notifier\TexterInterface;
|
||||
class ShortMessageHandler
|
||||
{
|
||||
private readonly PhoneNumberUtil $phoneNumberUtil;
|
||||
|
||||
public function __construct(private readonly TexterInterface $texter)
|
||||
{
|
||||
$this->phoneNumberUtil = PhoneNumberUtil::getInstance();
|
||||
}
|
||||
|
||||
public function __invoke(ShortMessage $message): void
|
||||
{
|
||||
trigger_deprecation('Chill-project/chill-bundles', '3.7.0', 'Send message using Notifier component');
|
||||
|
||||
@@ -47,8 +47,6 @@ class ChillTwigHelper extends AbstractExtension
|
||||
* @param string $value Default to 'No value'. Fallback to default if null
|
||||
* @param string $message
|
||||
* @param string $template
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function printOrMessage(
|
||||
Environment $twig,
|
||||
|
||||
@@ -96,8 +96,6 @@ class ChillTwigRoutingHelper extends AbstractExtension
|
||||
* @param array $parameters
|
||||
* @param bool $relative
|
||||
* @param mixed|null $label
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getPathAddReturnPath($name, $parameters = [], $relative = false, $label = null): string
|
||||
{
|
||||
@@ -118,8 +116,6 @@ class ChillTwigRoutingHelper extends AbstractExtension
|
||||
* @param string $name
|
||||
* @param array $parameters
|
||||
* @param bool $relative
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getPathForwardReturnPath($name, $parameters = [], $relative = false): string
|
||||
{
|
||||
|
||||
@@ -83,8 +83,6 @@ abstract class AbstractAggregatorTest extends KernelTestCase
|
||||
* Compare aliases array before and after that aggregator alter query.
|
||||
*
|
||||
* @dataProvider dataProviderAliasDidNotDisappears
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function testAliasDidNotDisappears(QueryBuilder $qb, array $data): void
|
||||
{
|
||||
|
||||
@@ -46,11 +46,9 @@ trait PrepareUserTrait
|
||||
*
|
||||
* @param array $permissions an array of permissions, with key 'center' for the center and key 'attrs' for an array of ['role' => (string), 'scope' => (int)]
|
||||
*
|
||||
* @return User
|
||||
*
|
||||
* @throws \LogicException if the trait is not set up
|
||||
*/
|
||||
protected static function prepareUser(array $permissions): \Chill\MainBundle\Entity\User
|
||||
protected static function prepareUser(array $permissions): User
|
||||
{
|
||||
$user = new User();
|
||||
|
||||
|
||||
@@ -23,6 +23,11 @@ use PHPUnit\Framework\TestCase;
|
||||
use Prophecy\PhpUnit\ProphecyTrait;
|
||||
use Symfony\Bundle\SecurityBundle\Security;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* @coversNothing
|
||||
*/
|
||||
final class TrackCreateUpdateSubscriberTest extends TestCase
|
||||
{
|
||||
use ProphecyTrait;
|
||||
@@ -126,6 +131,7 @@ class TestTrackCreationEntity implements TrackCreationInterface, TrackUpdateInte
|
||||
public function setCreatedAt(\DateTimeInterface $datetime): self
|
||||
{
|
||||
$this->createdAt = $datetime instanceof \DateTime ? \DateTimeImmutable::createFromMutable($datetime) : $datetime;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
@@ -137,6 +143,7 @@ class TestTrackCreationEntity implements TrackCreationInterface, TrackUpdateInte
|
||||
public function setCreatedBy(User $user): self
|
||||
{
|
||||
$this->createdBy = $user;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
@@ -148,6 +155,7 @@ class TestTrackCreationEntity implements TrackCreationInterface, TrackUpdateInte
|
||||
public function setUpdatedAt(\DateTimeInterface $datetime): self
|
||||
{
|
||||
$this->updatedAt = $datetime instanceof \DateTime ? \DateTimeImmutable::createFromMutable($datetime) : $datetime;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
@@ -159,6 +167,7 @@ class TestTrackCreationEntity implements TrackCreationInterface, TrackUpdateInte
|
||||
public function setUpdatedBy(User $user): self
|
||||
{
|
||||
$this->updatedBy = $user;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
@@ -176,6 +185,7 @@ class TestTrackUpdateEntity implements TrackUpdateInterface
|
||||
public function setUpdatedAt(\DateTimeInterface $datetime): self
|
||||
{
|
||||
$this->updatedAt = $datetime instanceof \DateTime ? \DateTimeImmutable::createFromMutable($datetime) : $datetime;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
@@ -187,6 +197,7 @@ class TestTrackUpdateEntity implements TrackUpdateInterface
|
||||
public function setUpdatedBy(User $user): self
|
||||
{
|
||||
$this->updatedBy = $user;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -121,7 +121,7 @@ final class PointTest extends KernelTestCase
|
||||
$this->assertEquals($point->toWKT(), 'SRID=4326;POINT(4.8634 50.47382)');
|
||||
}
|
||||
|
||||
private function preparePoint($lon, $lat): \Chill\MainBundle\Doctrine\Model\Point
|
||||
private function preparePoint($lon, $lat): Point
|
||||
{
|
||||
return Point::fromLonLat($lon, $lat);
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user