fixes after merge of master into upgrade-sf4

This commit is contained in:
2024-02-12 22:31:16 +01:00
parent 37af488f69
commit f889d67e94
664 changed files with 795 additions and 1980 deletions

View File

@@ -22,9 +22,7 @@ use Symfony\Component\Workflow\Event\Event;
final readonly class WorkflowByUserCounter implements NotificationCounterInterface, EventSubscriberInterface
{
public function __construct(private EntityWorkflowStepRepository $workflowStepRepository, private CacheItemPoolInterface $cacheItemPool)
{
}
public function __construct(private EntityWorkflowStepRepository $workflowStepRepository, private CacheItemPoolInterface $cacheItemPool) {}
public function addNotification(UserInterface $u): int
{

View File

@@ -20,9 +20,7 @@ class EntityWorkflowManager
/**
* @param \Chill\MainBundle\Workflow\EntityWorkflowHandlerInterface[] $handlers
*/
public function __construct(private readonly iterable $handlers, private readonly Registry $registry)
{
}
public function __construct(private readonly iterable $handlers, private readonly Registry $registry) {}
public function getHandler(EntityWorkflow $entityWorkflow, array $options = []): EntityWorkflowHandlerInterface
{

View File

@@ -23,9 +23,7 @@ use Symfony\Component\Workflow\TransitionBlocker;
class EntityWorkflowTransitionEventSubscriber implements EventSubscriberInterface
{
public function __construct(private readonly LoggerInterface $chillLogger, private readonly Security $security, private readonly UserRender $userRender)
{
}
public function __construct(private readonly LoggerInterface $chillLogger, private readonly Security $security, private readonly UserRender $userRender) {}
public function addDests(Event $event): void
{

View File

@@ -23,9 +23,7 @@ use Symfony\Component\Workflow\Registry;
class NotificationOnTransition implements EventSubscriberInterface
{
public function __construct(private readonly EntityManagerInterface $entityManager, private readonly \Twig\Environment $engine, private readonly MetadataExtractor $metadataExtractor, private readonly Security $security, private readonly Registry $registry)
{
}
public function __construct(private readonly EntityManagerInterface $entityManager, private readonly \Twig\Environment $engine, private readonly MetadataExtractor $metadataExtractor, private readonly Security $security, private readonly Registry $registry) {}
public static function getSubscribedEvents(): array
{

View File

@@ -20,9 +20,7 @@ use Symfony\Component\Workflow\Registry;
class SendAccessKeyEventSubscriber
{
public function __construct(private readonly \Twig\Environment $engine, private readonly MetadataExtractor $metadataExtractor, private readonly Registry $registry, private readonly EntityWorkflowManager $entityWorkflowManager, private readonly MailerInterface $mailer)
{
}
public function __construct(private readonly \Twig\Environment $engine, private readonly MetadataExtractor $metadataExtractor, private readonly Registry $registry, private readonly EntityWorkflowManager $entityWorkflowManager, private readonly MailerInterface $mailer) {}
public function postPersist(EntityWorkflowStep $step): void
{

View File

@@ -11,6 +11,4 @@ declare(strict_types=1);
namespace Chill\MainBundle\Workflow\Exception;
class HandlerNotFoundException extends \RuntimeException
{
}
class HandlerNotFoundException extends \RuntimeException {}

View File

@@ -19,9 +19,7 @@ use Symfony\Component\Workflow\WorkflowInterface;
class MetadataExtractor
{
public function __construct(private readonly Registry $registry, private readonly TranslatableStringHelperInterface $translatableStringHelper)
{
}
public function __construct(private readonly Registry $registry, private readonly TranslatableStringHelperInterface $translatableStringHelper) {}
public function availableWorkflowFor(string $relatedEntityClass, ?int $relatedEntityId = 0): array
{

View File

@@ -20,9 +20,7 @@ use Symfony\Component\Security\Core\Security;
class WorkflowNotificationHandler implements NotificationHandlerInterface
{
public function __construct(private readonly EntityWorkflowRepository $entityWorkflowRepository, private readonly EntityWorkflowManager $entityWorkflowManager, private readonly Security $security)
{
}
public function __construct(private readonly EntityWorkflowRepository $entityWorkflowRepository, private readonly EntityWorkflowManager $entityWorkflowManager, private readonly Security $security) {}
public function getTemplate(Notification $notification, array $options = []): string
{

View File

@@ -23,9 +23,7 @@ use Twig\Extension\RuntimeExtensionInterface;
class WorkflowTwigExtensionRuntime implements RuntimeExtensionInterface
{
public function __construct(private readonly EntityWorkflowManager $entityWorkflowManager, private readonly Registry $registry, private readonly EntityWorkflowRepository $repository, private readonly MetadataExtractor $metadataExtractor, private readonly NormalizerInterface $normalizer)
{
}
public function __construct(private readonly EntityWorkflowManager $entityWorkflowManager, private readonly Registry $registry, private readonly EntityWorkflowRepository $repository, private readonly MetadataExtractor $metadataExtractor, private readonly NormalizerInterface $normalizer) {}
public function getTransitionByString(EntityWorkflow $entityWorkflow, string $key): ?Transition
{

View File

@@ -21,9 +21,7 @@ use Symfony\Component\Workflow\WorkflowInterface;
class EntityWorkflowCreationValidator extends \Symfony\Component\Validator\ConstraintValidator
{
public function __construct(private readonly EntityWorkflowManager $entityWorkflowManager)
{
}
public function __construct(private readonly EntityWorkflowManager $entityWorkflowManager) {}
/**
* @param EntityWorkflow $value