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

@@ -15,6 +15,7 @@ use Chill\BudgetBundle\Entity\AbstractElement;
use Chill\BudgetBundle\Security\Authorization\BudgetElementVoter;
use Chill\PersonBundle\Entity\Person;
use Doctrine\ORM\EntityManagerInterface;
use Doctrine\Persistence\ManagerRegistry;
use Psr\Log\LoggerInterface;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
@@ -25,9 +26,12 @@ use Symfony\Contracts\Translation\TranslatorInterface;
abstract class AbstractElementController extends AbstractController
{
public function __construct(protected EntityManagerInterface $em, protected TranslatorInterface $translator, protected LoggerInterface $chillMainLogger)
{
}
public function __construct(
protected EntityManagerInterface $em,
protected TranslatorInterface $translator,
protected LoggerInterface $chillMainLogger,
protected ManagerRegistry $managerRegistry,
) {}
/**
* Route(

View File

@@ -21,9 +21,7 @@ use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
class ElementController extends AbstractController
{
public function __construct(private readonly CalculatorManager $calculator, private readonly ResourceRepository $resourceRepository, private readonly ChargeRepository $chargeRepository)
{
}
public function __construct(private readonly CalculatorManager $calculator, private readonly ResourceRepository $resourceRepository, private readonly ChargeRepository $chargeRepository) {}
/**
* @\Symfony\Component\Routing\Annotation\Route("{_locale}/budget/elements/by-person/{id}", name="chill_budget_elements_index")

View File

@@ -27,9 +27,7 @@ use Symfony\Contracts\Translation\TranslatorInterface;
class ChargeType extends AbstractType
{
public function __construct(protected TranslatableStringHelperInterface $translatableStringHelper, private readonly ChargeKindRepository $repository, private readonly TranslatorInterface $translator)
{
}
public function __construct(protected TranslatableStringHelperInterface $translatableStringHelper, private readonly ChargeKindRepository $repository, private readonly TranslatorInterface $translator) {}
public function buildForm(FormBuilderInterface $builder, array $options)
{

View File

@@ -26,9 +26,7 @@ use Symfony\Contracts\Translation\TranslatorInterface;
class ResourceType extends AbstractType
{
public function __construct(protected TranslatableStringHelperInterface $translatableStringHelper, private readonly ResourceKindRepository $repository, private readonly TranslatorInterface $translator)
{
}
public function __construct(protected TranslatableStringHelperInterface $translatableStringHelper, private readonly ResourceKindRepository $repository, private readonly TranslatorInterface $translator) {}
public function buildForm(FormBuilderInterface $builder, array $options)
{

View File

@@ -17,9 +17,7 @@ use Symfony\Component\Security\Core\Security;
final readonly class AdminMenuBuilder implements LocalMenuBuilderInterface
{
public function __construct(private Security $security)
{
}
public function __construct(private Security $security) {}
public function buildMenu($menuId, MenuItem $menu, array $parameters)
{

View File

@@ -20,9 +20,7 @@ use Symfony\Contracts\Translation\TranslatorInterface;
class HouseholdMenuBuilder implements LocalMenuBuilderInterface
{
public function __construct(protected AuthorizationCheckerInterface $authorizationChecker, protected TranslatorInterface $translator)
{
}
public function __construct(protected AuthorizationCheckerInterface $authorizationChecker, protected TranslatorInterface $translator) {}
public function buildMenu($menuId, MenuItem $menu, array $parameters)
{

View File

@@ -20,9 +20,7 @@ use Symfony\Contracts\Translation\TranslatorInterface;
class PersonMenuBuilder implements LocalMenuBuilderInterface
{
public function __construct(protected AuthorizationCheckerInterface $authorizationChecker, protected TranslatorInterface $translator)
{
}
public function __construct(protected AuthorizationCheckerInterface $authorizationChecker, protected TranslatorInterface $translator) {}
public function buildMenu($menuId, MenuItem $menu, array $parameters)
{

View File

@@ -34,9 +34,7 @@ final readonly class SummaryBudget implements SummaryBudgetInterface
private const QUERY_RESOURCE_BY_PERSON = 'select SUM(amount) AS sum, string_agg(comment, \'|\') AS comment, resource_id AS kind_id FROM chill_budget.resource WHERE person_id = ? AND NOW() BETWEEN startdate AND COALESCE(enddate, \'infinity\'::timestamp) GROUP BY resource_id';
public function __construct(private EntityManagerInterface $em, private TranslatableStringHelperInterface $translatableStringHelper, private ResourceKindRepositoryInterface $resourceKindRepository, private ChargeKindRepositoryInterface $chargeKindRepository)
{
}
public function __construct(private EntityManagerInterface $em, private TranslatableStringHelperInterface $translatableStringHelper, private ResourceKindRepositoryInterface $resourceKindRepository, private ChargeKindRepositoryInterface $chargeKindRepository) {}
public function getSummaryForHousehold(?Household $household): array
{

View File

@@ -21,9 +21,7 @@ use Chill\MainBundle\Templating\TranslatableStringHelperInterface;
*/
final readonly class BudgetElementTypeRender implements ChillEntityRenderInterface
{
public function __construct(private TranslatableStringHelperInterface $translatableStringHelper, private \Twig\Environment $engine)
{
}
public function __construct(private TranslatableStringHelperInterface $translatableStringHelper, private \Twig\Environment $engine) {}
public function renderBox($entity, array $options): string
{