From f5b5aeb6ccf31796bf14189e80b689013592424c Mon Sep 17 00:00:00 2001 From: Wojdylak Date: Tue, 19 Nov 2024 15:34:20 +0100 Subject: [PATCH] [Admin][Twig][Component] Replace private with protected constructor parameters --- .../Twig/Component/Customer/OrderStatisticsComponent.php | 4 ++-- .../Twig/Component/Dashboard/ChannelSelectorComponent.php | 2 +- .../Twig/Component/Dashboard/NewCustomersComponent.php | 2 +- .../Twig/Component/Dashboard/NewOrdersComponent.php | 4 ++-- .../Twig/Component/Dashboard/StatisticsComponent.php | 4 ++-- .../Twig/Component/Order/AddressHistoryComponent.php | 2 +- .../Twig/Component/Product/Form/ProductTaxonsComponent.php | 2 +- .../AdminBundle/Twig/Component/Product/FormComponent.php | 6 +++--- .../Product/ProductAttributeAutocompleteComponent.php | 2 +- .../Twig/Component/ProductVariant/FormComponent.php | 4 ++-- .../PromotionCoupon/GeneratorInstructionFormComponent.php | 4 ++-- .../Twig/Component/Shared/Navbar/NotificationsComponent.php | 4 ++-- .../Twig/Component/Shared/Navbar/ShopPreviewComponent.php | 2 +- .../Twig/Component/Shared/Navbar/UserDropdownComponent.php | 4 ++-- .../Component/Shared/RenderEntityWithTemplateComponent.php | 2 +- .../AdminBundle/Twig/Component/Taxon/DeleteComponent.php | 2 +- .../AdminBundle/Twig/Component/Taxon/FormComponent.php | 2 +- .../AdminBundle/Twig/Component/Taxon/TreeComponent.php | 6 +++--- 18 files changed, 29 insertions(+), 29 deletions(-) diff --git a/src/Sylius/Bundle/AdminBundle/Twig/Component/Customer/OrderStatisticsComponent.php b/src/Sylius/Bundle/AdminBundle/Twig/Component/Customer/OrderStatisticsComponent.php index f2b78a0008..dfca878e03 100644 --- a/src/Sylius/Bundle/AdminBundle/Twig/Component/Customer/OrderStatisticsComponent.php +++ b/src/Sylius/Bundle/AdminBundle/Twig/Component/Customer/OrderStatisticsComponent.php @@ -38,8 +38,8 @@ class OrderStatisticsComponent * @param CustomerRepositoryInterface $customerRepository */ public function __construct( - private readonly CustomerRepositoryInterface $customerRepository, - private readonly CustomerStatisticsProviderInterface $statisticsProvider, + protected readonly CustomerRepositoryInterface $customerRepository, + protected readonly CustomerStatisticsProviderInterface $statisticsProvider, ) { } diff --git a/src/Sylius/Bundle/AdminBundle/Twig/Component/Dashboard/ChannelSelectorComponent.php b/src/Sylius/Bundle/AdminBundle/Twig/Component/Dashboard/ChannelSelectorComponent.php index 6665e1a945..127523bbd2 100644 --- a/src/Sylius/Bundle/AdminBundle/Twig/Component/Dashboard/ChannelSelectorComponent.php +++ b/src/Sylius/Bundle/AdminBundle/Twig/Component/Dashboard/ChannelSelectorComponent.php @@ -41,7 +41,7 @@ class ChannelSelectorComponent /** * @param ChannelRepositoryInterface $channelRepository */ - public function __construct(private readonly ChannelRepositoryInterface $channelRepository) + public function __construct(protected readonly ChannelRepositoryInterface $channelRepository) { } diff --git a/src/Sylius/Bundle/AdminBundle/Twig/Component/Dashboard/NewCustomersComponent.php b/src/Sylius/Bundle/AdminBundle/Twig/Component/Dashboard/NewCustomersComponent.php index b7dca4a5f0..d35609f4cb 100644 --- a/src/Sylius/Bundle/AdminBundle/Twig/Component/Dashboard/NewCustomersComponent.php +++ b/src/Sylius/Bundle/AdminBundle/Twig/Component/Dashboard/NewCustomersComponent.php @@ -27,7 +27,7 @@ class NewCustomersComponent * @param CustomerRepositoryInterface $customerRepository */ public function __construct( - private readonly CustomerRepositoryInterface $customerRepository, + protected readonly CustomerRepositoryInterface $customerRepository, ) { } diff --git a/src/Sylius/Bundle/AdminBundle/Twig/Component/Dashboard/NewOrdersComponent.php b/src/Sylius/Bundle/AdminBundle/Twig/Component/Dashboard/NewOrdersComponent.php index 14a8b1ee52..881b451dc6 100644 --- a/src/Sylius/Bundle/AdminBundle/Twig/Component/Dashboard/NewOrdersComponent.php +++ b/src/Sylius/Bundle/AdminBundle/Twig/Component/Dashboard/NewOrdersComponent.php @@ -43,8 +43,8 @@ class NewOrdersComponent * @param ChannelRepositoryInterface $channelRepository */ public function __construct( - private readonly OrderRepositoryInterface $orderRepository, - private readonly ChannelRepositoryInterface $channelRepository, + protected readonly OrderRepositoryInterface $orderRepository, + protected readonly ChannelRepositoryInterface $channelRepository, ) { } diff --git a/src/Sylius/Bundle/AdminBundle/Twig/Component/Dashboard/StatisticsComponent.php b/src/Sylius/Bundle/AdminBundle/Twig/Component/Dashboard/StatisticsComponent.php index 67535d193a..54e30a3b58 100644 --- a/src/Sylius/Bundle/AdminBundle/Twig/Component/Dashboard/StatisticsComponent.php +++ b/src/Sylius/Bundle/AdminBundle/Twig/Component/Dashboard/StatisticsComponent.php @@ -55,8 +55,8 @@ class StatisticsComponent * @param ChannelRepositoryInterface $channelRepository */ public function __construct( - private readonly ChannelRepositoryInterface $channelRepository, - private readonly StatisticsProviderInterface $statisticsProvider, + protected readonly ChannelRepositoryInterface $channelRepository, + protected readonly StatisticsProviderInterface $statisticsProvider, ) { } diff --git a/src/Sylius/Bundle/AdminBundle/Twig/Component/Order/AddressHistoryComponent.php b/src/Sylius/Bundle/AdminBundle/Twig/Component/Order/AddressHistoryComponent.php index ba444bfe92..e5326549fa 100644 --- a/src/Sylius/Bundle/AdminBundle/Twig/Component/Order/AddressHistoryComponent.php +++ b/src/Sylius/Bundle/AdminBundle/Twig/Component/Order/AddressHistoryComponent.php @@ -27,7 +27,7 @@ class AddressHistoryComponent /** @param RepositoryInterface $addressLogRepository */ public function __construct( - private readonly RepositoryInterface $addressLogRepository, + protected readonly RepositoryInterface $addressLogRepository, ) { } diff --git a/src/Sylius/Bundle/AdminBundle/Twig/Component/Product/Form/ProductTaxonsComponent.php b/src/Sylius/Bundle/AdminBundle/Twig/Component/Product/Form/ProductTaxonsComponent.php index 1e7fb7a2d4..3dca132c4f 100644 --- a/src/Sylius/Bundle/AdminBundle/Twig/Component/Product/Form/ProductTaxonsComponent.php +++ b/src/Sylius/Bundle/AdminBundle/Twig/Component/Product/Form/ProductTaxonsComponent.php @@ -19,7 +19,7 @@ use Symfony\UX\TwigComponent\Attribute\AsTwigComponent; #[AsTwigComponent] class ProductTaxonsComponent { - public function __construct(private readonly AllTaxonsInterface $allTaxons) + public function __construct(protected readonly AllTaxonsInterface $allTaxons) { } diff --git a/src/Sylius/Bundle/AdminBundle/Twig/Component/Product/FormComponent.php b/src/Sylius/Bundle/AdminBundle/Twig/Component/Product/FormComponent.php index 01049f4191..4e1d3f8f8c 100644 --- a/src/Sylius/Bundle/AdminBundle/Twig/Component/Product/FormComponent.php +++ b/src/Sylius/Bundle/AdminBundle/Twig/Component/Product/FormComponent.php @@ -65,9 +65,9 @@ class FormComponent FormFactoryInterface $formFactory, string $resourceClass, string $formClass, - private readonly SlugGeneratorInterface $slugGenerator, - private readonly RepositoryInterface $productAttributeRepository, - private readonly ProductFactoryInterface $productFactory, + protected readonly SlugGeneratorInterface $slugGenerator, + protected readonly RepositoryInterface $productAttributeRepository, + protected readonly ProductFactoryInterface $productFactory, ) { $this->initialize($productRepository, $formFactory, $resourceClass, $formClass); } diff --git a/src/Sylius/Bundle/AdminBundle/Twig/Component/Product/ProductAttributeAutocompleteComponent.php b/src/Sylius/Bundle/AdminBundle/Twig/Component/Product/ProductAttributeAutocompleteComponent.php index c958cb4514..90f706e172 100644 --- a/src/Sylius/Bundle/AdminBundle/Twig/Component/Product/ProductAttributeAutocompleteComponent.php +++ b/src/Sylius/Bundle/AdminBundle/Twig/Component/Product/ProductAttributeAutocompleteComponent.php @@ -36,7 +36,7 @@ class ProductAttributeAutocompleteComponent use TemplatePropTrait; public function __construct( - private readonly ChecksumCalculator $checksumCalculator, + protected readonly ChecksumCalculator $checksumCalculator, ) { } diff --git a/src/Sylius/Bundle/AdminBundle/Twig/Component/ProductVariant/FormComponent.php b/src/Sylius/Bundle/AdminBundle/Twig/Component/ProductVariant/FormComponent.php index f1a3231075..1a64795689 100644 --- a/src/Sylius/Bundle/AdminBundle/Twig/Component/ProductVariant/FormComponent.php +++ b/src/Sylius/Bundle/AdminBundle/Twig/Component/ProductVariant/FormComponent.php @@ -46,8 +46,8 @@ class FormComponent FormFactoryInterface $formFactory, string $resourceClass, string $formClass, - private readonly ProductVariantFactoryInterface $productVariantFactory, - private readonly ProductRepositoryInterface $productRepository, + protected readonly ProductVariantFactoryInterface $productVariantFactory, + protected readonly ProductRepositoryInterface $productRepository, ) { $this->initialize($productVariantRepository, $formFactory, $resourceClass, $formClass); } diff --git a/src/Sylius/Bundle/AdminBundle/Twig/Component/PromotionCoupon/GeneratorInstructionFormComponent.php b/src/Sylius/Bundle/AdminBundle/Twig/Component/PromotionCoupon/GeneratorInstructionFormComponent.php index 4fe2a25d3f..ab4e53fa7b 100644 --- a/src/Sylius/Bundle/AdminBundle/Twig/Component/PromotionCoupon/GeneratorInstructionFormComponent.php +++ b/src/Sylius/Bundle/AdminBundle/Twig/Component/PromotionCoupon/GeneratorInstructionFormComponent.php @@ -30,8 +30,8 @@ class GeneratorInstructionFormComponent use TemplatePropTrait; public function __construct( - private readonly FormFactoryInterface $formFactory, - private readonly string $formClass, + protected readonly FormFactoryInterface $formFactory, + protected readonly string $formClass, ) { } diff --git a/src/Sylius/Bundle/AdminBundle/Twig/Component/Shared/Navbar/NotificationsComponent.php b/src/Sylius/Bundle/AdminBundle/Twig/Component/Shared/Navbar/NotificationsComponent.php index 4251d5e427..7262c0a62a 100644 --- a/src/Sylius/Bundle/AdminBundle/Twig/Component/Shared/Navbar/NotificationsComponent.php +++ b/src/Sylius/Bundle/AdminBundle/Twig/Component/Shared/Navbar/NotificationsComponent.php @@ -19,8 +19,8 @@ use Symfony\UX\TwigComponent\Attribute\ExposeInTemplate; class NotificationsComponent { public function __construct( - private readonly NotificationProviderInterface $notificationProvider, - private readonly bool $areNotificationsEnabled, + protected readonly NotificationProviderInterface $notificationProvider, + protected readonly bool $areNotificationsEnabled, ) { } diff --git a/src/Sylius/Bundle/AdminBundle/Twig/Component/Shared/Navbar/ShopPreviewComponent.php b/src/Sylius/Bundle/AdminBundle/Twig/Component/Shared/Navbar/ShopPreviewComponent.php index 72b753370d..b54a2e7f98 100644 --- a/src/Sylius/Bundle/AdminBundle/Twig/Component/Shared/Navbar/ShopPreviewComponent.php +++ b/src/Sylius/Bundle/AdminBundle/Twig/Component/Shared/Navbar/ShopPreviewComponent.php @@ -20,7 +20,7 @@ use Symfony\UX\TwigComponent\Attribute\ExposeInTemplate; class ShopPreviewComponent { /** @param ChannelRepositoryInterface $channelRepository */ - public function __construct(private readonly ChannelRepositoryInterface $channelRepository) + public function __construct(protected readonly ChannelRepositoryInterface $channelRepository) { } diff --git a/src/Sylius/Bundle/AdminBundle/Twig/Component/Shared/Navbar/UserDropdownComponent.php b/src/Sylius/Bundle/AdminBundle/Twig/Component/Shared/Navbar/UserDropdownComponent.php index 52b51dc44b..c17f303b66 100644 --- a/src/Sylius/Bundle/AdminBundle/Twig/Component/Shared/Navbar/UserDropdownComponent.php +++ b/src/Sylius/Bundle/AdminBundle/Twig/Component/Shared/Navbar/UserDropdownComponent.php @@ -21,8 +21,8 @@ use Symfony\UX\TwigComponent\Attribute\ExposeInTemplate; class UserDropdownComponent { public function __construct( - private readonly UrlGeneratorInterface $urlGenerator, - private readonly LoggedInAdminUserProviderInterface $loggedInAdminUserProvider, + protected readonly UrlGeneratorInterface $urlGenerator, + protected readonly LoggedInAdminUserProviderInterface $loggedInAdminUserProvider, ) { } diff --git a/src/Sylius/Bundle/AdminBundle/Twig/Component/Shared/RenderEntityWithTemplateComponent.php b/src/Sylius/Bundle/AdminBundle/Twig/Component/Shared/RenderEntityWithTemplateComponent.php index 1d4820227f..a3919746ca 100644 --- a/src/Sylius/Bundle/AdminBundle/Twig/Component/Shared/RenderEntityWithTemplateComponent.php +++ b/src/Sylius/Bundle/AdminBundle/Twig/Component/Shared/RenderEntityWithTemplateComponent.php @@ -19,7 +19,7 @@ use Symfony\UX\TwigComponent\Attribute\ExposeInTemplate; class RenderEntityWithTemplateComponent { public function __construct( - private EntityManagerInterface $entityManager, + protected EntityManagerInterface $entityManager, ) { } diff --git a/src/Sylius/Bundle/AdminBundle/Twig/Component/Taxon/DeleteComponent.php b/src/Sylius/Bundle/AdminBundle/Twig/Component/Taxon/DeleteComponent.php index 652952c154..0025f4a9fb 100644 --- a/src/Sylius/Bundle/AdminBundle/Twig/Component/Taxon/DeleteComponent.php +++ b/src/Sylius/Bundle/AdminBundle/Twig/Component/Taxon/DeleteComponent.php @@ -37,7 +37,7 @@ final class DeleteComponent public string $taxonId = ''; public function __construct( - private readonly CsrfTokenManagerInterface $csrfTokenManager, + protected readonly CsrfTokenManagerInterface $csrfTokenManager, ) { } diff --git a/src/Sylius/Bundle/AdminBundle/Twig/Component/Taxon/FormComponent.php b/src/Sylius/Bundle/AdminBundle/Twig/Component/Taxon/FormComponent.php index 7d349d5ac1..4220bc1545 100644 --- a/src/Sylius/Bundle/AdminBundle/Twig/Component/Taxon/FormComponent.php +++ b/src/Sylius/Bundle/AdminBundle/Twig/Component/Taxon/FormComponent.php @@ -44,7 +44,7 @@ class FormComponent FormFactoryInterface $formFactory, string $resourceClass, string $formClass, - private readonly TaxonSlugGeneratorInterface $slugGenerator, + protected readonly TaxonSlugGeneratorInterface $slugGenerator, ) { $this->initialize($repository, $formFactory, $resourceClass, $formClass); } diff --git a/src/Sylius/Bundle/AdminBundle/Twig/Component/Taxon/TreeComponent.php b/src/Sylius/Bundle/AdminBundle/Twig/Component/Taxon/TreeComponent.php index 56ee3cf113..9b549101f7 100644 --- a/src/Sylius/Bundle/AdminBundle/Twig/Component/Taxon/TreeComponent.php +++ b/src/Sylius/Bundle/AdminBundle/Twig/Component/Taxon/TreeComponent.php @@ -33,9 +33,9 @@ class TreeComponent /** @param TaxonRepositoryInterface $taxonRepository */ public function __construct( - private readonly AllTaxonsInterface $allTaxons, - private readonly TaxonRepositoryInterface $taxonRepository, - private readonly ObjectManager $taxonManager, + protected readonly AllTaxonsInterface $allTaxons, + protected readonly TaxonRepositoryInterface $taxonRepository, + protected readonly ObjectManager $taxonManager, ) { }