diff --git a/.github/workflows/behat.yml b/.github/workflows/behat.yml index 62b3e24015..c8e2b7adb4 100644 --- a/.github/workflows/behat.yml +++ b/.github/workflows/behat.yml @@ -24,7 +24,7 @@ jobs: strategy: matrix: php: [7.2, 7.3, 7.4] - symfony: [~3.4, ^4.0] + symfony: [^4.0] pimcore: [~6.6.0, ~6.7.0, ~6.8.0, ~6.9.0] steps: diff --git a/.gitignore b/.gitignore index e5f431f500..86856139fd 100644 --- a/.gitignore +++ b/.gitignore @@ -57,3 +57,4 @@ tmp/ phpda.html parameters.yml var +vendor \ No newline at end of file diff --git a/composer.json b/composer.json index a16365195b..ad0090a160 100644 --- a/composer.json +++ b/composer.json @@ -116,7 +116,8 @@ "dpfaffenbauer/process-manager": "<2.4", "pimcore/pimcore": "6.1.0 || 6.1.1 || 6.5.2", "monolog/monolog": ">=2", - "symfony/monolog-bundle": "3.6.0" + "symfony/monolog-bundle": "3.6.0", + "symfony/symfony": "3.4.49" }, "suggest": { "dpfaffenbauer/process-manager": "Allows to start Processes from within Pimcore UI and also tracks the status." diff --git a/src/CoreShop/Bundle/CoreBundle/DependencyInjection/Compiler/RegisterIndexProductExtensionPass.php b/src/CoreShop/Bundle/CoreBundle/DependencyInjection/Compiler/RegisterIndexProductExtensionPass.php index 541bbd8898..57a151f314 100644 --- a/src/CoreShop/Bundle/CoreBundle/DependencyInjection/Compiler/RegisterIndexProductExtensionPass.php +++ b/src/CoreShop/Bundle/CoreBundle/DependencyInjection/Compiler/RegisterIndexProductExtensionPass.php @@ -31,6 +31,9 @@ public function process(ContainerBuilder $container) if ($container->hasParameter($stackId)) { $registry = $container->getDefinition('coreshop.registry.index.extensions'); + /** + * @var array $stack + */ $stack = $container->getParameter($stackId); foreach ($stack as $class) { diff --git a/src/CoreShop/Bundle/FrontendBundle/DependencyInjection/CompilerPass/RegisterFrontendControllerPass.php b/src/CoreShop/Bundle/FrontendBundle/DependencyInjection/CompilerPass/RegisterFrontendControllerPass.php index 82aeb9b3fe..c1bdfcd28a 100644 --- a/src/CoreShop/Bundle/FrontendBundle/DependencyInjection/CompilerPass/RegisterFrontendControllerPass.php +++ b/src/CoreShop/Bundle/FrontendBundle/DependencyInjection/CompilerPass/RegisterFrontendControllerPass.php @@ -21,6 +21,9 @@ class RegisterFrontendControllerPass implements CompilerPassInterface { public function process(ContainerBuilder $container) { + /** + * @var array $controllers + */ $controllers = $container->getParameter('coreshop.frontend.controllers'); foreach ($controllers as $key => $value) { diff --git a/src/CoreShop/Bundle/IndexBundle/Controller/IndexController.php b/src/CoreShop/Bundle/IndexBundle/Controller/IndexController.php index a77aa05580..bb81601132 100644 --- a/src/CoreShop/Bundle/IndexBundle/Controller/IndexController.php +++ b/src/CoreShop/Bundle/IndexBundle/Controller/IndexController.php @@ -74,6 +74,9 @@ public function getConfigAction() ]; } + /** + * @var array $fieldTypes + */ $fieldTypes = $this->getParameter('coreshop.index.mapping_types'); $fieldTypesResult = []; diff --git a/src/CoreShop/Bundle/NotificationBundle/Controller/NotificationRuleController.php b/src/CoreShop/Bundle/NotificationBundle/Controller/NotificationRuleController.php index c5666b6ff1..213af8dc80 100644 --- a/src/CoreShop/Bundle/NotificationBundle/Controller/NotificationRuleController.php +++ b/src/CoreShop/Bundle/NotificationBundle/Controller/NotificationRuleController.php @@ -26,7 +26,14 @@ public function getConfigAction(Request $request) $actions = []; $types = []; + /** + * @var array $actionTypes + */ $actionTypes = $this->getParameter('coreshop.notification_rule.actions.types'); + + /** + * @var array $conditionTypes + */ $conditionTypes = $this->getParameter('coreshop.notification_rule.conditions.types'); foreach ($actionTypes as $type) { diff --git a/src/CoreShop/Bundle/OrderBundle/Controller/OrderController.php b/src/CoreShop/Bundle/OrderBundle/Controller/OrderController.php index 005ce81393..bde789f3a9 100644 --- a/src/CoreShop/Bundle/OrderBundle/Controller/OrderController.php +++ b/src/CoreShop/Bundle/OrderBundle/Controller/OrderController.php @@ -70,6 +70,9 @@ public function getFolderConfigurationAction() */ public function getStatesAction(Request $request) { + /** + * @var array $identifiers + */ $identifiers = $this->getParameter('coreshop.state_machines'); $states = []; $transitions = []; diff --git a/src/CoreShop/Bundle/ProductQuantityPriceRulesBundle/CoreExtension/ProductQuantityPriceRules.php b/src/CoreShop/Bundle/ProductQuantityPriceRulesBundle/CoreExtension/ProductQuantityPriceRules.php index f19d81cab4..695f096a2e 100644 --- a/src/CoreShop/Bundle/ProductQuantityPriceRulesBundle/CoreExtension/ProductQuantityPriceRules.php +++ b/src/CoreShop/Bundle/ProductQuantityPriceRulesBundle/CoreExtension/ProductQuantityPriceRules.php @@ -264,10 +264,20 @@ public function getDataForEditmode($data, $object = null, $params = []) $calculationBehaviourTypes = []; $pricingBehaviourTypes = []; - foreach ($this->getContainer()->getParameter('coreshop.product_quantity_price_rules.calculators') as $type) { + /** + * @var array $priceCalculators + */ + $priceCalculators = $this->getContainer()->getParameter('coreshop.product_quantity_price_rules.calculators'); + + /** + * @var array $actions + */ + $actions = $this->getContainer()->getParameter('coreshop.product_quantity_price_rules.actions'); + + foreach ($priceCalculators as $type) { $calculationBehaviourTypes[] = [$type, 'coreshop_product_quantity_price_rules_calculator_' . strtolower($type)]; } - foreach ($this->getContainer()->getParameter('coreshop.product_quantity_price_rules.actions') as $type) { + foreach ($$actions as $type) { $pricingBehaviourTypes[] = [$type, 'coreshop_product_quantity_price_rules_behaviour_' . strtolower($type)]; } diff --git a/src/CoreShop/Bundle/ResourceBundle/Controller/ResourceSettingsController.php b/src/CoreShop/Bundle/ResourceBundle/Controller/ResourceSettingsController.php index ceebb2de7d..cd4ef65662 100644 --- a/src/CoreShop/Bundle/ResourceBundle/Controller/ResourceSettingsController.php +++ b/src/CoreShop/Bundle/ResourceBundle/Controller/ResourceSettingsController.php @@ -49,9 +49,12 @@ public function getConfigAction() 'stack' => [], ]; - if ($this->container->hasParameter('coreshop.all.pimcore_classes')) { - $classes = $this->getParameter('coreshop.all.pimcore_classes'); + /** + * @var array $classes + */ + $classes = $this->container->hasParameter('coreshop.all.pimcore_classes'); + if ($classes) { foreach ($classes as $key => $definition) { $alias = explode('.', $key); $application = $alias[0]; @@ -63,6 +66,9 @@ public function getConfigAction() $config['classMap'][$application][$alias] = $class; } + /** + * @var array $stack + */ $stack = $this->container->getParameter('coreshop.all.stack.pimcore_class_names'); foreach ($stack as $key => $impl) { diff --git a/src/CoreShop/Bundle/ResourceBundle/DependencyInjection/Compiler/RegisterPimcoreResourcesPass.php b/src/CoreShop/Bundle/ResourceBundle/DependencyInjection/Compiler/RegisterPimcoreResourcesPass.php index 16a2060dd5..caaca2e31d 100644 --- a/src/CoreShop/Bundle/ResourceBundle/DependencyInjection/Compiler/RegisterPimcoreResourcesPass.php +++ b/src/CoreShop/Bundle/ResourceBundle/DependencyInjection/Compiler/RegisterPimcoreResourcesPass.php @@ -25,6 +25,9 @@ final class RegisterPimcoreResourcesPass implements CompilerPassInterface public function process(ContainerBuilder $container) { try { + /** + * @var array $resources + */ $resources = $container->getParameter('coreshop.all.pimcore_classes'); $registry = $container->findDefinition(RegistryInterface::class); } catch (InvalidArgumentException $exception) { diff --git a/src/CoreShop/Bundle/ResourceBundle/DependencyInjection/Compiler/RegisterResourcesPass.php b/src/CoreShop/Bundle/ResourceBundle/DependencyInjection/Compiler/RegisterResourcesPass.php index bb8ba4fb5c..07aee690fd 100644 --- a/src/CoreShop/Bundle/ResourceBundle/DependencyInjection/Compiler/RegisterResourcesPass.php +++ b/src/CoreShop/Bundle/ResourceBundle/DependencyInjection/Compiler/RegisterResourcesPass.php @@ -26,6 +26,9 @@ final class RegisterResourcesPass implements CompilerPassInterface public function process(ContainerBuilder $container) { try { + /** + * @var array $resources + */ $resources = $container->getParameter('coreshop.resources'); $registry = $container->findDefinition(RegistryInterface::class); } catch (InvalidArgumentException $exception) { diff --git a/src/CoreShop/Bundle/ResourceBundle/DependencyInjection/Compiler/StackClassesPass.php b/src/CoreShop/Bundle/ResourceBundle/DependencyInjection/Compiler/StackClassesPass.php index faeace3a77..d8d1ff2f3c 100644 --- a/src/CoreShop/Bundle/ResourceBundle/DependencyInjection/Compiler/StackClassesPass.php +++ b/src/CoreShop/Bundle/ResourceBundle/DependencyInjection/Compiler/StackClassesPass.php @@ -26,7 +26,14 @@ public function process(ContainerBuilder $container) return; } + /** + * @var array $classes + */ $classes = $container->getParameter('coreshop.all.pimcore_classes'); + + /** + * @var array $stack + */ $stack = $container->getParameter('coreshop.all.stack'); $classStack = []; diff --git a/src/CoreShop/Bundle/ResourceBundle/DependencyInjection/Compiler/StackRepositoryPass.php b/src/CoreShop/Bundle/ResourceBundle/DependencyInjection/Compiler/StackRepositoryPass.php index bc70a147b7..0a5a4b75c5 100644 --- a/src/CoreShop/Bundle/ResourceBundle/DependencyInjection/Compiler/StackRepositoryPass.php +++ b/src/CoreShop/Bundle/ResourceBundle/DependencyInjection/Compiler/StackRepositoryPass.php @@ -32,9 +32,17 @@ public function process(ContainerBuilder $container) return; } + /** + * @var array $stackConfig + */ $stackConfig = $container->getParameter('coreshop.all.stack'); - foreach ($container->getParameter('coreshop.all.stack.fqcns') as $alias => $classes) { + /** + * @var array $fqcns + */ + $fqcns = $container->getParameter('coreshop.all.stack.fqcns'); + + foreach ($fqcns as $alias => $classes) { list($applicationName, $name) = explode('.', $alias); $definition = new Definition(Metadata::class); diff --git a/src/CoreShop/Bundle/ResourceBundle/DependencyInjection/Driver/Pimcore/PimcoreDriver.php b/src/CoreShop/Bundle/ResourceBundle/DependencyInjection/Driver/Pimcore/PimcoreDriver.php index cc32edff48..fcf6df3427 100644 --- a/src/CoreShop/Bundle/ResourceBundle/DependencyInjection/Driver/Pimcore/PimcoreDriver.php +++ b/src/CoreShop/Bundle/ResourceBundle/DependencyInjection/Driver/Pimcore/PimcoreDriver.php @@ -127,6 +127,9 @@ protected function addPimcoreClass(ContainerBuilder $container, MetadataInterfac $allPaths = []; if ($container->hasParameter($parameterName)) { + /** + * @var array $allPaths + */ $allPaths = $container->getParameter($parameterName); } diff --git a/src/CoreShop/Bundle/ResourceBundle/DependencyInjection/Extension/AbstractModelExtension.php b/src/CoreShop/Bundle/ResourceBundle/DependencyInjection/Extension/AbstractModelExtension.php index d0102f6b2c..42c50b08a4 100644 --- a/src/CoreShop/Bundle/ResourceBundle/DependencyInjection/Extension/AbstractModelExtension.php +++ b/src/CoreShop/Bundle/ResourceBundle/DependencyInjection/Extension/AbstractModelExtension.php @@ -95,6 +95,9 @@ public function registerStack($applicationName, $stack, ContainerBuilder $contai $globalParameterName = 'coreshop.all.stack'; foreach ([$appParameterName, $globalParameterName] as $parameterName) { + /** + * @var array $stackConfig + */ $stackConfig = $container->hasParameter($parameterName) ? $container->getParameter($parameterName) : []; foreach ($stack as $key => $interface) { @@ -144,10 +147,16 @@ protected function registerPimcoreResources($applicationName, $bundleResources, $globalPermissions = []; if ($container->hasParameter($applicationParameter)) { + /** + * @var array $applicationPermissions + */ $applicationPermissions = $container->getParameter($applicationParameter); } if ($container->hasParameter($globalParameter)) { + /** + * @var array $globalPermissions + */ $globalPermissions = $container->getParameter($globalParameter); } diff --git a/src/CoreShop/Bundle/ResourceBundle/Installer/AbstractTranslationInstaller.php b/src/CoreShop/Bundle/ResourceBundle/Installer/AbstractTranslationInstaller.php index 94ef908696..929c1a0ec2 100644 --- a/src/CoreShop/Bundle/ResourceBundle/Installer/AbstractTranslationInstaller.php +++ b/src/CoreShop/Bundle/ResourceBundle/Installer/AbstractTranslationInstaller.php @@ -55,6 +55,9 @@ public function installResources(OutputInterface $output, $applicationName = nul $parameter = $this->getIdentifier($applicationName); if ($this->kernel->getContainer()->hasParameter($parameter)) { + /** + * @var array $translationFilesToInstall + */ $translationFilesToInstall = $this->kernel->getContainer()->getParameter($parameter); $translationsToInstall = []; diff --git a/src/CoreShop/Bundle/ResourceBundle/Installer/PimcoreClassInstaller.php b/src/CoreShop/Bundle/ResourceBundle/Installer/PimcoreClassInstaller.php index d8a5ad4803..c3204a3dff 100644 --- a/src/CoreShop/Bundle/ResourceBundle/Installer/PimcoreClassInstaller.php +++ b/src/CoreShop/Bundle/ResourceBundle/Installer/PimcoreClassInstaller.php @@ -65,6 +65,9 @@ public function installResources(OutputInterface $output, $applicationName = nul $parameter = $applicationName ? sprintf('%s.pimcore_classes', $applicationName) : 'coreshop.all.pimcore_classes'; if ($this->kernel->getContainer()->hasParameter($parameter)) { + /** + * @var array $pimcoreClasses + */ $pimcoreClasses = $this->kernel->getContainer()->getParameter($parameter); $fieldCollections = []; $bricks = []; diff --git a/src/CoreShop/Bundle/ResourceBundle/Installer/PimcoreDocumentsInstaller.php b/src/CoreShop/Bundle/ResourceBundle/Installer/PimcoreDocumentsInstaller.php index bd266243ad..00f17f5483 100644 --- a/src/CoreShop/Bundle/ResourceBundle/Installer/PimcoreDocumentsInstaller.php +++ b/src/CoreShop/Bundle/ResourceBundle/Installer/PimcoreDocumentsInstaller.php @@ -49,6 +49,9 @@ public function installResources(OutputInterface $output, $applicationName = nul ) : 'coreshop.all.pimcore.admin.install.documents'; if ($this->kernel->getContainer()->hasParameter($parameter)) { + /** + * @var array $documentFilesToInstall + */ $documentFilesToInstall = $this->kernel->getContainer()->getParameter($parameter); $docsToInstall = []; diff --git a/src/CoreShop/Bundle/ResourceBundle/Installer/PimcoreGridConfigInstaller.php b/src/CoreShop/Bundle/ResourceBundle/Installer/PimcoreGridConfigInstaller.php index 5a7e99029a..c59005d156 100644 --- a/src/CoreShop/Bundle/ResourceBundle/Installer/PimcoreGridConfigInstaller.php +++ b/src/CoreShop/Bundle/ResourceBundle/Installer/PimcoreGridConfigInstaller.php @@ -80,6 +80,9 @@ public function installResources(OutputInterface $output, $applicationName = nul $parameter = $applicationName ? sprintf('%s.pimcore.admin.install.grid_config', $applicationName) : 'coreshop.all.pimcore.admin.install.grid_config'; if ($this->kernel->getContainer()->hasParameter($parameter)) { + /** + * @var array $routeFilesToInstall + */ $routeFilesToInstall = $this->kernel->getContainer()->getParameter($parameter); $gridConfigsToInstall = []; diff --git a/src/CoreShop/Bundle/ResourceBundle/Installer/PimcoreImageThumbnailsInstaller.php b/src/CoreShop/Bundle/ResourceBundle/Installer/PimcoreImageThumbnailsInstaller.php index dce7ea6ab1..70acbfa494 100644 --- a/src/CoreShop/Bundle/ResourceBundle/Installer/PimcoreImageThumbnailsInstaller.php +++ b/src/CoreShop/Bundle/ResourceBundle/Installer/PimcoreImageThumbnailsInstaller.php @@ -43,6 +43,9 @@ public function installResources(OutputInterface $output, $applicationName = nul $parameter = $applicationName ? sprintf('%s.pimcore.admin.install.image_thumbnails', $applicationName) : 'coreshop.all.pimcore.admin.install.image_thumbnails'; if ($this->kernel->getContainer()->hasParameter($parameter)) { + /** + * @var array $thumbnailFilesToInstall + */ $thumbnailFilesToInstall = $this->kernel->getContainer()->getParameter($parameter); $thumbnailsToInstall = []; diff --git a/src/CoreShop/Bundle/ResourceBundle/Installer/PimcorePermissionInstaller.php b/src/CoreShop/Bundle/ResourceBundle/Installer/PimcorePermissionInstaller.php index 19a66b6e03..8a4c80a5aa 100644 --- a/src/CoreShop/Bundle/ResourceBundle/Installer/PimcorePermissionInstaller.php +++ b/src/CoreShop/Bundle/ResourceBundle/Installer/PimcorePermissionInstaller.php @@ -49,6 +49,9 @@ public function installResources(OutputInterface $output, $applicationName = nul $parameter = $applicationName ? sprintf('%s.permissions', $applicationName) : 'coreshop.all.permissions'; if ($this->kernel->getContainer()->hasParameter($parameter)) { + /** + * @var array $permissionGroups + */ $permissionGroups = $this->kernel->getContainer()->getParameter($parameter); if ($parameter !== 'coreshop.all.permissions') { diff --git a/src/CoreShop/Bundle/ResourceBundle/Installer/PimcoreRoutesInstaller.php b/src/CoreShop/Bundle/ResourceBundle/Installer/PimcoreRoutesInstaller.php index 305a5c1c7e..087386dda0 100644 --- a/src/CoreShop/Bundle/ResourceBundle/Installer/PimcoreRoutesInstaller.php +++ b/src/CoreShop/Bundle/ResourceBundle/Installer/PimcoreRoutesInstaller.php @@ -43,6 +43,9 @@ public function installResources(OutputInterface $output, $applicationName = nul $parameter = $applicationName ? sprintf('%s.pimcore.admin.install.routes', $applicationName) : 'coreshop.all.pimcore.admin.install.routes'; if ($this->kernel->getContainer()->hasParameter($parameter)) { + /** + * @var array $routeFilesToInstall + */ $routeFilesToInstall = $this->kernel->getContainer()->getParameter($parameter); $routesToInstall = []; diff --git a/src/CoreShop/Bundle/ResourceBundle/Installer/SqlInstaller.php b/src/CoreShop/Bundle/ResourceBundle/Installer/SqlInstaller.php index 634573118d..ea74853cf8 100644 --- a/src/CoreShop/Bundle/ResourceBundle/Installer/SqlInstaller.php +++ b/src/CoreShop/Bundle/ResourceBundle/Installer/SqlInstaller.php @@ -40,6 +40,9 @@ public function installResources(OutputInterface $output, $applicationName = nul $parameter = $applicationName ? sprintf('%s.pimcore.admin.install.sql', $applicationName) : 'coreshop.all.pimcore.admin.install.sql'; if ($this->kernel->getContainer()->hasParameter($parameter)) { + /** + * @var array $sqlFilesToExecute + */ $sqlFilesToExecute = $this->kernel->getContainer()->getParameter($parameter); $progress = new ProgressBar($output); diff --git a/src/CoreShop/Bundle/ShippingBundle/Controller/CarrierController.php b/src/CoreShop/Bundle/ShippingBundle/Controller/CarrierController.php index d5442d734f..f36cfaa75f 100644 --- a/src/CoreShop/Bundle/ShippingBundle/Controller/CarrierController.php +++ b/src/CoreShop/Bundle/ShippingBundle/Controller/CarrierController.php @@ -18,6 +18,9 @@ class CarrierController extends ResourceController { public function getConfigAction() { + /** + * @var array $strategies + */ $strategies = $this->getParameter('coreshop.shipping.tax_calculation_strategies'); $convertedStrategies = [];