diff --git a/src/FileProcessor/FlexForms/Rector/v7/v6/RenderTypeFlexFormRector.php b/src/FileProcessor/FlexForms/Rector/v7/v6/RenderTypeFlexFormRector.php index f40b31ca4..8eda81dec 100644 --- a/src/FileProcessor/FlexForms/Rector/v7/v6/RenderTypeFlexFormRector.php +++ b/src/FileProcessor/FlexForms/Rector/v7/v6/RenderTypeFlexFormRector.php @@ -90,16 +90,16 @@ protected function refactorColumn(?DOMElement $configElement): void if ($renderModeDomElement instanceof DOMElement) { $renderMode = $renderModeDomElement->nodeValue; switch ($renderMode) { - case 'tree': + case 'tree' : $renderTypeName = 'selectTree'; break; - case 'singlebox': + case 'singlebox' : $renderTypeName = 'selectSingleBox'; break; - case 'checkbox': + case 'checkbox' : $renderTypeName = 'selectCheckBox'; break; - default: + default : $renderTypeName = null; } diff --git a/src/FileProcessor/TypoScript/Conditions/GlobalVarConditionMatcher.php b/src/FileProcessor/TypoScript/Conditions/GlobalVarConditionMatcher.php index 03f0831c2..ef9130cbe 100644 --- a/src/FileProcessor/TypoScript/Conditions/GlobalVarConditionMatcher.php +++ b/src/FileProcessor/TypoScript/Conditions/GlobalVarConditionMatcher.php @@ -53,34 +53,34 @@ public function change(string $condition): ?string } switch ($type) { - case 'TSFE': + case 'TSFE' : $conditions[$key][] = $this->refactorTsfe($property, $operator, $value); break; - case 'GP': + case 'GP' : $conditions[$key][] = $this->refactorGetPost($property, $operator, $value); break; - case 'LIT': + case 'LIT' : $conditions[$key][] = sprintf('"%s" %s "%s"', $value, self::OPERATOR_MAPPING[$operator], $property); break; - case 'ENV': + case 'ENV' : $conditions[$key][] = $this->createEnvCondition($property, $operator, $value); break; - case 'IENV': + case 'IENV' : $conditions[$key][] = $this->createIndependentCondition($property, $operator, $value); break; - case 'BE_USER': + case 'BE_USER' : $conditions[$key][] = $this->createBackendUserCondition($property, $operator, $value); break; - case '_GET': + case '_GET' : $conditions[$key][] = $this->refactorGet($property, $operator, $value); break; - case 'GPmerged': + case 'GPmerged' : $conditions[$key][] = $this->refactorGetPost($property, $operator, $value); break; - case '_POST': + case '_POST' : $conditions[$key][] = $this->refactorPost($property, $operator, $value); break; - default: + default : $conditions[$key][] = $condition; break; } diff --git a/src/Rector/v11/v4/MigrateFileFolderConfigurationRector.php b/src/Rector/v11/v4/MigrateFileFolderConfigurationRector.php index b9f1fcdf4..3fb414fca 100644 --- a/src/Rector/v11/v4/MigrateFileFolderConfigurationRector.php +++ b/src/Rector/v11/v4/MigrateFileFolderConfigurationRector.php @@ -65,6 +65,10 @@ protected function refactorColumn(Expr $columnName, Expr $columnTca): void return; } + if ($this->hasKey($configArray, 'fileFolderConfig')) { + return; + } + $fileFolderConfig = new Array_(); $fileFolder = $this->extractArrayItemByKey($configArray, 'fileFolder'); diff --git a/tests/Rector/v11/v4/MigrateFileFolderConfigurationRector/Fixture/fixture.php.inc b/tests/Rector/v11/v4/MigrateFileFolderConfigurationRector/Fixture/fixture.php.inc index a46263ae4..191e86374 100644 --- a/tests/Rector/v11/v4/MigrateFileFolderConfigurationRector/Fixture/fixture.php.inc +++ b/tests/Rector/v11/v4/MigrateFileFolderConfigurationRector/Fixture/fixture.php.inc @@ -14,7 +14,24 @@ return [ 'fileFolder_extList' => 'svg', 'fileFolder_recursions' => 1, ] - ] + ], + "iconSelector" => [ + "label" => "Icon auswählen", + "description" => "", + "config" => [ + "type" => "select", + "items" => [["", ""]], + "renderType" => "selectSingle", + "fileFolder" => "EXT:site_package/Modules/GlobalTemplates/Assets/icons/selectable_icons_be/", + "fileFolder_extList" => "svg", + "fileFolder_recursions" => 0, + "fieldWizard" => [ + "selectIcons" => [ + "disabled" => false, + ], + ], + ], + ], ], ]; @@ -34,7 +51,22 @@ return [ 'renderType' => 'selectSingle', 'fileFolderConfig' => ['folder' => 'EXT:my_ext/Resources/Public/Icons', 'allowedExtensions' => 'svg', 'depth' => 1], ] - ] + ], + "iconSelector" => [ + "label" => "Icon auswählen", + "description" => "", + "config" => [ + "type" => "select", + "items" => [["", ""]], + "renderType" => "selectSingle", + "fieldWizard" => [ + "selectIcons" => [ + "disabled" => false, + ], + ], + 'fileFolderConfig' => ['folder' => "EXT:site_package/Modules/GlobalTemplates/Assets/icons/selectable_icons_be/", 'allowedExtensions' => "svg", 'depth' => 0], + ], + ], ], ];