[TASK] Apply rector set php71 51/62751/5
authorAlexander Schnitzler <git@alexanderschnitzler.de>
Thu, 19 Dec 2019 14:49:31 +0000 (15:49 +0100)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Mon, 30 Dec 2019 09:26:07 +0000 (10:26 +0100)
    php bin/rector process

A couple of rectors have been disabled due to different reasons:

- Rector\Php71\Rector\FuncCall\CountOnNullRector
  This rector has been disabled as it creates rather long and
  complex structures to avoid calling count on null.

  This rector will be enabled as soon as TYPO3 uses at least
  PHP 7.3 which introduces a "is_countable" method.

- Rector\Php71\Rector\Assign\AssignArrayToStringRector
  This rector has been disabled as it does not work properly.
  The default types of parameters have been changed although
  their types could properly be inferred by a doc block or
  by value assignments.

- Rector\Php71\Rector\BinaryOp\BinaryOpBetweenNumberAndStringRector
  This rector has been disabled as it does not work properly.
  A bug report is filed and to be found here:
  https://github.com/rectorphp/rector/issues/2454

- Rector\Php71\Rector\FuncCall\RemoveExtraParametersRector
  This rector has been disabled as it does not work properly.
  It removed arguments in tests, especially when using
  prophecies.

Releases: master
Resolves: #90002
Change-Id: I6ed14d38cc697a23104286db57535d6a3c0dbf62
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/62751
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Benni Mack <benni@typo3.org>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Benni Mack <benni@typo3.org>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
131 files changed:
rector.yml
typo3/sysext/backend/Classes/Backend/Shortcut/ShortcutRepository.php
typo3/sysext/backend/Classes/Clipboard/Clipboard.php
typo3/sysext/backend/Classes/Controller/BackendController.php
typo3/sysext/backend/Classes/Controller/EditDocumentController.php
typo3/sysext/backend/Classes/Controller/Wizard/TableController.php
typo3/sysext/backend/Classes/Domain/Repository/Module/BackendModuleRepository.php
typo3/sysext/backend/Classes/Domain/Repository/TableManualRepository.php
typo3/sysext/backend/Classes/Form/Element/ImageManipulationElement.php
typo3/sysext/backend/Classes/Form/Element/InputLinkElement.php
typo3/sysext/backend/Classes/Form/FormDataProvider/AbstractItemProvider.php
typo3/sysext/backend/Classes/Form/FormDataProvider/DatabaseRecordTypeValue.php
typo3/sysext/backend/Classes/Form/FormDataProvider/EvaluateDisplayConditions.php
typo3/sysext/backend/Classes/Form/FormDataProvider/TcaFlexPrepare.php
typo3/sysext/backend/Classes/Form/FormDataProvider/TcaGroup.php
typo3/sysext/backend/Classes/Form/FormDataProvider/TcaRecordTitle.php
typo3/sysext/backend/Classes/Form/Wizard/SuggestWizardDefaultReceiver.php
typo3/sysext/backend/Classes/Middleware/ForcedHttpsBackendRedirector.php
typo3/sysext/backend/Classes/Module/ModuleLoader.php
typo3/sysext/backend/Classes/Search/LiveSearch/LiveSearch.php
typo3/sysext/backend/Classes/Search/LiveSearch/QueryParser.php
typo3/sysext/backend/Classes/Template/Components/MetaInformation.php
typo3/sysext/backend/Classes/Template/DocumentTemplate.php
typo3/sysext/backend/Classes/Tree/View/AbstractTreeView.php
typo3/sysext/backend/Classes/Tree/View/FolderTreeView.php
typo3/sysext/backend/Classes/Utility/BackendUtility.php
typo3/sysext/backend/Classes/View/BackendLayout/DataProviderCollection.php
typo3/sysext/backend/Classes/View/PageLayoutView.php
typo3/sysext/backend/Tests/Unit/Form/FormDataProvider/TcaSelectItemsTest.php
typo3/sysext/core/Classes/Authentication/BackendUserAuthentication.php
typo3/sysext/core/Classes/Cache/Backend/MemcachedBackend.php
typo3/sysext/core/Classes/Cache/Backend/RedisBackend.php
typo3/sysext/core/Classes/Charset/CharsetConverter.php
typo3/sysext/core/Classes/Compatibility/SlotReplacement.php
typo3/sysext/core/Classes/Configuration/FlexForm/FlexFormTools.php
typo3/sysext/core/Classes/Controller/IconController.php
typo3/sysext/core/Classes/Core/SystemEnvironmentBuilder.php
typo3/sysext/core/Classes/DataHandling/DataHandler.php
typo3/sysext/core/Classes/DataHandling/Localization/DataMapItem.php
typo3/sysext/core/Classes/DataHandling/Localization/DataMapProcessor.php
typo3/sysext/core/Classes/Database/Query/QueryBuilder.php
typo3/sysext/core/Classes/Database/QueryGenerator.php
typo3/sysext/core/Classes/Database/ReferenceIndex.php
typo3/sysext/core/Classes/Database/RelationHandler.php
typo3/sysext/core/Classes/Database/Schema/SchemaMigrator.php
typo3/sysext/core/Classes/Database/SoftReferenceIndex.php
typo3/sysext/core/Classes/DependencyInjection/AutowireInjectMethodsPass.php
typo3/sysext/core/Classes/Html/HtmlParser.php
typo3/sysext/core/Classes/Html/RteHtmlParser.php
typo3/sysext/core/Classes/Http/Dispatcher.php
typo3/sysext/core/Classes/Http/NormalizedParams.php
typo3/sysext/core/Classes/Http/Request.php
typo3/sysext/core/Classes/Http/Response.php
typo3/sysext/core/Classes/Http/Uri.php
typo3/sysext/core/Classes/Imaging/GraphicalFunctions.php
typo3/sysext/core/Classes/LinkHandling/LegacyLinkNotationConverter.php
typo3/sysext/core/Classes/Localization/Locales.php
typo3/sysext/core/Classes/Localization/Parser/AbstractXmlParser.php
typo3/sysext/core/Classes/Log/LogManager.php
typo3/sysext/core/Classes/Package/PackageManager.php
typo3/sysext/core/Classes/Page/PageRenderer.php
typo3/sysext/core/Classes/Resource/AbstractFile.php
typo3/sysext/core/Classes/Resource/Folder.php
typo3/sysext/core/Classes/Resource/Index/FileIndexRepository.php
typo3/sysext/core/Classes/Resource/Index/Indexer.php
typo3/sysext/core/Classes/Resource/Processing/LocalCropScaleMaskHelper.php
typo3/sysext/core/Classes/Resource/ResourceFactory.php
typo3/sysext/core/Classes/Resource/ResourceStorage.php
typo3/sysext/core/Classes/TypoScript/ExtendedTemplateService.php
typo3/sysext/core/Classes/TypoScript/Parser/TypoScriptParser.php
typo3/sysext/core/Classes/TypoScript/TemplateService.php
typo3/sysext/core/Classes/Utility/CommandUtility.php
typo3/sysext/core/Classes/Utility/ExtensionManagementUtility.php
typo3/sysext/core/Classes/Utility/File/ExtendedFileUtility.php
typo3/sysext/core/Classes/Utility/GeneralUtility.php
typo3/sysext/core/Classes/Utility/PathUtility.php
typo3/sysext/core/Classes/Utility/ResourceUtility.php
typo3/sysext/core/Classes/Utility/RootlineUtility.php
typo3/sysext/extbase/Classes/Configuration/FrontendConfigurationManager.php
typo3/sysext/extbase/Classes/Routing/ExtbasePluginEnhancer.php
typo3/sysext/extbase/Classes/Utility/TypeHandlingUtility.php
typo3/sysext/extensionmanager/Classes/Controller/ActionController.php
typo3/sysext/extensionmanager/Classes/Controller/DownloadController.php
typo3/sysext/felogin/Classes/Controller/FrontendLoginController.php
typo3/sysext/filelist/Classes/FileList.php
typo3/sysext/fluid/Classes/ViewHelpers/Link/EmailViewHelper.php
typo3/sysext/form/Classes/Hooks/DataStructureIdentifierHook.php
typo3/sysext/form/Classes/Mvc/Persistence/FormPersistenceManager.php
typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php
typo3/sysext/frontend/Classes/ContentObject/Menu/AbstractMenuContentObject.php
typo3/sysext/frontend/Classes/ContentObject/ScalableVectorGraphicsContentObject.php
typo3/sysext/frontend/Classes/ContentObject/TemplateContentObject.php
typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php
typo3/sysext/frontend/Classes/Middleware/FrontendUserAuthenticator.php
typo3/sysext/frontend/Classes/Plugin/AbstractPlugin.php
typo3/sysext/frontend/Classes/Typolink/EmailLinkBuilder.php
typo3/sysext/frontend/Classes/Typolink/PageLinkBuilder.php
typo3/sysext/frontend/Tests/Unit/ContentObject/ContentObjectRendererTest.php
typo3/sysext/impexp/Classes/Export.php
typo3/sysext/impexp/Classes/Import.php
typo3/sysext/impexp/Classes/ImportExport.php
typo3/sysext/impexp/Tests/Functional/AbstractImportExportTestCase.php
typo3/sysext/indexed_search/Classes/Domain/Repository/IndexSearchRepository.php
typo3/sysext/indexed_search/Classes/FileContentParser.php
typo3/sysext/indexed_search/Classes/Hook/CrawlerHook.php
typo3/sysext/indexed_search/Classes/Indexer.php
typo3/sysext/indexed_search/Classes/Lexer.php
typo3/sysext/install/Classes/Configuration/Image/ImageMagick6Preset.php
typo3/sysext/install/Classes/Controller/EnvironmentController.php
typo3/sysext/install/Classes/Controller/IconController.php
typo3/sysext/linkvalidator/Classes/Linktype/FileLinktype.php
typo3/sysext/linkvalidator/Classes/Linktype/LinkHandler.php
typo3/sysext/lowlevel/Classes/Command/CleanFlexFormsCommand.php
typo3/sysext/lowlevel/Classes/Controller/DatabaseIntegrityController.php
typo3/sysext/lowlevel/Classes/Integrity/DatabaseIntegrityCheck.php
typo3/sysext/lowlevel/Classes/Utility/ArrayBrowser.php
typo3/sysext/opendocs/Classes/Service/OpenDocumentService.php
typo3/sysext/recordlist/Classes/Browser/AbstractElementBrowser.php
typo3/sysext/recordlist/Classes/Browser/DatabaseBrowser.php
typo3/sysext/recordlist/Classes/Controller/ElementBrowserController.php
typo3/sysext/recordlist/Classes/RecordList/DatabaseRecordList.php
typo3/sysext/recycler/Classes/Domain/Model/DeletedRecords.php
typo3/sysext/redirects/Classes/Service/RedirectService.php
typo3/sysext/reports/Classes/Report/Status/ConfigurationStatus.php
typo3/sysext/scheduler/Classes/Command/SchedulerCommand.php
typo3/sysext/scheduler/Classes/CronCommand/NormalizeCommand.php
typo3/sysext/tstemplate/Classes/Controller/TypoScriptTemplateObjectBrowserModuleFunctionController.php
typo3/sysext/workspaces/Classes/Controller/PreviewController.php
typo3/sysext/workspaces/Classes/Controller/Remote/ActionHandler.php
typo3/sysext/workspaces/Classes/Hook/DataHandlerHook.php
typo3/sysext/workspaces/Classes/Preview/PreviewUriBuilder.php

index bb1ac73..bdac2cd 100644 (file)
@@ -15,9 +15,14 @@ parameters:
   exclude_rectors:
     - Rector\Php55\Rector\String_\StringClassNameToClassConstantRector
     - Rector\Php70\Rector\List_\ListSwapArrayOrderRector
+    - Rector\Php71\Rector\Assign\AssignArrayToStringRector # this rector does not detect class properties right and changes them
+    - Rector\Php71\Rector\BinaryOp\BinaryOpBetweenNumberAndStringRector # this rector is currently broken, bug report: https://github.com/rectorphp/rector/issues/2454
+    - Rector\Php71\Rector\FuncCall\CountOnNullRector # can be enabled again if min php version is and actives sets include php73 as that version introduced "is_countable"
+    - Rector\Php71\Rector\FuncCall\RemoveExtraParametersRector # this breaks tests (prophecies)
   sets:
     - 'php53'
     - 'php54'
     - 'php55'
     - 'php56'
     - 'php70'
+    - 'php71'
index 35b28ba..8a3b446 100644 (file)
@@ -484,7 +484,7 @@ class ShortcutRepository
         while ($row = $result->fetch()) {
             $shortcut = ['raw' => $row];
 
-            list($row['module_name'], $row['M_module_name']) = explode('|', $row['module_name']);
+            [$row['module_name'], $row['M_module_name']] = explode('|', $row['module_name']);
 
             $queryParts = parse_url($row['url']);
             // Explode GET vars recursively
@@ -662,7 +662,7 @@ class ShortcutRepository
                 $moduleName = $row['module_name'];
 
                 if (strpos($moduleName, '_') !== false) {
-                    list($mainModule, $subModule) = explode('_', $moduleName, 2);
+                    [$mainModule, $subModule] = explode('_', $moduleName, 2);
                     $iconIdentifier = $this->moduleLoader->modules[$mainModule]['sub'][$subModule]['iconIdentifier'];
                 } elseif (!empty($moduleName)) {
                     $iconIdentifier = $this->moduleLoader->modules[$moduleName]['iconIdentifier'];
@@ -693,7 +693,7 @@ class ShortcutRepository
         if (strpos($moduleName, 'xMOD_') === 0) {
             $title = substr($moduleName, 5);
         } else {
-            list($mainModule, $subModule) = explode('_', $moduleName);
+            [$mainModule, $subModule] = explode('_', $moduleName);
             $mainModuleLabels = $this->moduleLoader->getLabelsForModule($mainModule);
             $title = $languageService->sL($mainModuleLabels['title']);
 
index c0d7eb8..48485a8 100644 (file)
@@ -377,7 +377,7 @@ class Clipboard
         if (is_array($this->clipData[$pad]['el'] ?? false)) {
             foreach ($this->clipData[$pad]['el'] as $k => $v) {
                 if ($v) {
-                    list($table, $uid) = explode('|', $k);
+                    [$table, $uid] = explode('|', $k);
                     // Rendering files/directories on the clipboard
                     if ($table === '_FILE') {
                         $fileObject = ResourceFactory::getInstance()->retrieveFileOrFolderObject($v);
@@ -662,7 +662,7 @@ class Clipboard
         // All records
         $elements = $this->elFromTable('');
         foreach ($elements as $tP => $value) {
-            list($table, $uid) = explode('|', $tP);
+            [$table, $uid] = explode('|', $tP);
             $parameters['edit[' . $table . '][' . $uid . ']'] = 'edit';
         }
         $uriBuilder = GeneralUtility::makeInstance(UriBuilder::class);
@@ -761,7 +761,7 @@ class Clipboard
         if (is_array($this->clipData[$pad]['el'] ?? false)) {
             foreach ($this->clipData[$pad]['el'] as $k => $v) {
                 if ($v) {
-                    list($table, $uid) = explode('|', $k);
+                    [$table, $uid] = explode('|', $k);
                     // Rendering files/directories on the clipboard
                     if ($table === '_FILE') {
                         $file = ResourceFactory::getInstance()->getObjectFromCombinedIdentifier($v);
@@ -826,7 +826,7 @@ class Clipboard
     {
         if (is_array($this->clipData[$this->current]['el'] ?? false)) {
             foreach ($this->clipData[$this->current]['el'] as $k => $v) {
-                list($table, $uid) = explode('|', $k);
+                [$table, $uid] = explode('|', $k);
                 if ($table !== '_FILE') {
                     if (!$v || !is_array(BackendUtility::getRecord($table, $uid, 'uid'))) {
                         unset($this->clipData[$this->current]['el'][$k]);
@@ -863,7 +863,7 @@ class Clipboard
         if (is_array($this->clipData[$pad]['el'] ?? false)) {
             foreach ($this->clipData[$pad]['el'] as $k => $v) {
                 if ($v) {
-                    list($table, $uid) = explode('|', $k);
+                    [$table, $uid] = explode('|', $k);
                     if ($table !== '_FILE') {
                         if ((!$matchTable || (string)$table == (string)$matchTable) && $GLOBALS['TCA'][$table]) {
                             $list[$k] = $pad === 'normal' ? $v : $uid;
@@ -907,7 +907,7 @@ class Clipboard
         if (!$table && !$uid) {
             $elArr = $this->elFromTable('');
             reset($elArr);
-            list($table, $uid) = explode('|', key($elArr));
+            [$table, $uid] = explode('|', key($elArr));
         }
         if ($this->isSelected($table, $uid)) {
             $selRec = BackendUtility::getRecordWSOL($table, $uid);
@@ -947,7 +947,7 @@ class Clipboard
      */
     public function makePasteCmdArray($ref, $CMD, array $update = null)
     {
-        list($pTable, $pUid) = explode('|', $ref);
+        [$pTable, $pUid] = explode('|', $ref);
         $pUid = (int)$pUid;
         // pUid must be set and if pTable is not set (that means paste ALL elements)
         // the uid MUST be positive/zero (pointing to page id)
@@ -958,7 +958,7 @@ class Clipboard
             $mode = $this->currentMode() === 'copy' ? 'copy' : 'move';
             // Traverse elements and make CMD array
             foreach ($elements as $tP => $value) {
-                list($table, $uid) = explode('|', $tP);
+                [$table, $uid] = explode('|', $tP);
                 if (!is_array($CMD[$table])) {
                     $CMD[$table] = [];
                 }
@@ -991,7 +991,7 @@ class Clipboard
         // all records
         $elements = $this->elFromTable('');
         foreach ($elements as $tP => $value) {
-            list($table, $uid) = explode('|', $tP);
+            [$table, $uid] = explode('|', $tP);
             if (!is_array($CMD[$table])) {
                 $CMD[$table] = [];
             }
@@ -1017,7 +1017,7 @@ class Clipboard
      */
     public function makePasteCmdArray_file($ref, $FILE)
     {
-        list($pTable, $pUid) = explode('|', $ref);
+        [$pTable, $pUid] = explode('|', $ref);
         $elements = $this->elFromTable('_FILE');
         $mode = $this->currentMode() === 'copy' ? 'copy' : 'move';
         // Traverse elements and make CMD array
index 964ae73..c08b5f2 100644 (file)
@@ -459,7 +459,7 @@ class BackendController
             // check if the start module has additional parameters, so a redirect to a specific
             // action is possible
             if (strpos($startModule, '->') !== false) {
-                list($startModule, $startModuleParameters) = explode('->', $startModule, 2);
+                [$startModule, $startModuleParameters] = explode('->', $startModule, 2);
             }
         }
 
index 045b8b0..3c595ad 100644 (file)
@@ -2152,7 +2152,7 @@ class EditDocumentController
             return null;
         }
 
-        list($table, $origUid, $language) = explode(':', $justLocalized);
+        [$table, $origUid, $language] = explode(':', $justLocalized);
 
         if ($GLOBALS['TCA'][$table]
             && $GLOBALS['TCA'][$table]['ctrl']['languageField']
index fdf188a..322187d 100644 (file)
@@ -122,7 +122,7 @@ class TableController extends AbstractWizardController
 
         $normalizedParams = $request->getAttribute('normalizedParams');
         $requestUri = $normalizedParams->getRequestUri();
-        list($rUri) = explode('#', $requestUri);
+        [$rUri] = explode('#', $requestUri);
         $content = '<form action="' . htmlspecialchars($rUri) . '" method="post" id="TableController" name="wizardForm">';
         if ($this->P['table'] && $this->P['field'] && $this->P['uid']) {
             $tableWizard = $this->renderTableWizard($request);
index 41c681a..acd2f9e 100644 (file)
@@ -194,7 +194,7 @@ class BackendModuleRepository implements \TYPO3\CMS\Core\SingletonInterface
     protected function createMenuEntriesForTbeModulesExt()
     {
         foreach ($GLOBALS['TBE_MODULES_EXT'] ?? [] as $mainModule => $tbeModuleExt) {
-            list($main) = explode('_', $mainModule);
+            [$main] = explode('_', $mainModule);
             $mainEntry = $this->findByModuleName($main);
             if ($mainEntry === false) {
                 continue;
index 05f0c2a..1dcabe4 100644 (file)
@@ -178,7 +178,7 @@ class TableManualRepository
     protected function getTableFieldLabel($key, $field = '', $mergeToken = ': ')
     {
         // Get table / field parts
-        list($tableName, $fieldName) = $this->getTableFieldNames($key, $field);
+        [$tableName, $fieldName] = $this->getTableFieldNames($key, $field);
         // Create label
         return $this->getLanguageService()->sL($tableName) . ($field ? $mergeToken . rtrim(trim($this->getLanguageService()->sL($fieldName)), ':') : '');
     }
index 1e35860..d11ea6b 100644 (file)
@@ -225,8 +225,7 @@ class ImageManipulationElement extends AbstractFormElement
         if (MathUtility::canBeInterpretedAsInteger($fileUid)) {
             try {
                 $file = ResourceFactory::getInstance()->getFileObject($fileUid);
-            } catch (FileDoesNotExistException $e) {
-            } catch (\InvalidArgumentException $e) {
+            } catch (FileDoesNotExistException|\InvalidArgumentException $e) {
             }
         }
         return $file;
index fe6be85..c02f23f 100644 (file)
@@ -329,13 +329,7 @@ class InputLinkElement extends AbstractFormElement
 
         try {
             $linkData = $linkService->resolve($linkParts['url']);
-        } catch (FileDoesNotExistException $e) {
-            return $data;
-        } catch (FolderDoesNotExistException $e) {
-            return $data;
-        } catch (UnknownLinkHandlerException $e) {
-            return $data;
-        } catch (InvalidPathException $e) {
+        } catch (FileDoesNotExistException|FolderDoesNotExistException|UnknownLinkHandlerException|InvalidPathException $e) {
             return $data;
         }
 
index d43067b..48871b2 100644 (file)
@@ -1001,7 +1001,7 @@ abstract class AbstractItemProvider
 
         if (!empty($foreignTableClauseArray['ORDERBY'])) {
             foreach ($foreignTableClauseArray['ORDERBY'] as $orderPair) {
-                list($fieldName, $order) = $orderPair;
+                [$fieldName, $order] = $orderPair;
                 $queryBuilder->addOrderBy($fieldName, $order);
             }
         }
index eb58a6b..78d6a63 100644 (file)
@@ -70,7 +70,7 @@ class DatabaseRecordTypeValue implements FormDataProviderInterface
                 // a foreign table. localField then point to a group or select field in the own table,
                 // this points to a record in a foreign table and the value of foreignField is then
                 // used as type field. This was introduced for some FAL scenarios.
-                list($pointerField, $foreignTableTypeField) = explode(':', $tcaTypeField);
+                [$pointerField, $foreignTableTypeField] = explode(':', $tcaTypeField);
 
                 $relationType = $result['processedTca']['columns'][$pointerField]['config']['type'];
                 if ($relationType !== 'select' && $relationType !== 'group') {
index 8a6d250..924895d 100644 (file)
@@ -307,7 +307,7 @@ class EvaluateDisplayConditions implements FormDataProviderInterface
                     }
                     $namedConditionArray['operand'] = (int)$operand;
                 } elseif ($namedConditionArray['operator'] === '-' || $namedConditionArray['operator'] === '!-') {
-                    list($minimum, $maximum) = GeneralUtility::trimExplode('-', $operand);
+                    [$minimum, $maximum] = GeneralUtility::trimExplode('-', $operand);
                     if (!MathUtility::canBeInterpretedAsInteger($minimum) || !MathUtility::canBeInterpretedAsInteger($maximum)) {
                         throw new \RuntimeException(
                             'Field condition "' . $conditionString . '" with comparison operator ' . $namedConditionArray['operator']
index 6f677b7..fa0a5d4 100644 (file)
@@ -82,11 +82,7 @@ class TcaFlexPrepare implements FormDataProviderInterface
                     $result['databaseRow']
                 );
                 $dataStructureArray = $flexFormTools->parseDataStructureByIdentifier($dataStructureIdentifier);
-            } catch (InvalidParentRowException $e) {
-            } catch (InvalidParentRowLoopException $e) {
-            } catch (InvalidParentRowRootException $e) {
-            } catch (InvalidPointerFieldValueException $e) {
-            } catch (InvalidIdentifierException $e) {
+            } catch (InvalidParentRowException|InvalidParentRowLoopException|InvalidParentRowRootException|InvalidPointerFieldValueException|InvalidIdentifierException $e) {
             } finally {
                 // Add the identifier to TCA to use it later during rendering
                 $result['processedTca']['columns'][$fieldName]['config']['dataStructureIdentifier'] = $dataStructureIdentifier;
index eecd4a4..02990b6 100644 (file)
@@ -106,7 +106,7 @@ class TcaGroup implements FormDataProviderInterface
                     foreach ($allowed as $tablename) {
                         $elementValue = key($clipboard->elFromTable($tablename));
                         if ($elementValue) {
-                            list($elementTable, $elementUid) = explode('|', $elementValue);
+                            [$elementTable, $elementUid] = explode('|', $elementValue);
                             $record = BackendUtility::getRecordWSOL($elementTable, $elementUid);
                             $sanitizedClipboardElements[] = [
                                 'title' => BackendUtility::getRecordTitle($elementTable, $record),
@@ -118,7 +118,7 @@ class TcaGroup implements FormDataProviderInterface
                     // All tables allowed for relation:
                     $clipboardElements = array_keys($clipboard->elFromTable(''));
                     foreach ($clipboardElements as $elementValue) {
-                        list($elementTable, $elementUid) = explode('|', $elementValue);
+                        [$elementTable, $elementUid] = explode('|', $elementValue);
                         $record = BackendUtility::getRecordWSOL($elementTable, $elementUid);
                         $sanitizedClipboardElements[] = [
                             'title' => BackendUtility::getRecordTitle($elementTable, $record),
index 68530fb..669d496 100644 (file)
@@ -197,7 +197,7 @@ class TcaRecordTitle implements FormDataProviderInterface
             return '';
         }
         foreach ($fieldConfig['items'] as $item) {
-            list($itemLabel, $itemValue) = $item;
+            [$itemLabel, $itemValue] = $item;
             if ((string)$value === (string)$itemValue) {
                 return $itemLabel;
             }
index 84fcdc2..5492e8f 100644 (file)
@@ -335,7 +335,7 @@ class SuggestWizardDefaultReceiver
             $this->queryBuilder->addOrderBy($GLOBALS['TCA'][$this->table]['ctrl']['label']);
         } else {
             foreach (QueryHelper::parseOrderBy($this->config['orderBy']) as $orderPair) {
-                list($fieldName, $order) = $orderPair;
+                [$fieldName, $order] = $orderPair;
                 $this->queryBuilder->addOrderBy($fieldName, $order);
             }
         }
index 6ca26bf..4e90e5a 100644 (file)
@@ -45,8 +45,8 @@ class ForcedHttpsBackendRedirector implements MiddlewareInterface
             } else {
                 $sslPortSuffix = '';
             }
-            list(, $url) = explode('://', $request->getAttribute('normalizedParams')->getSiteUrl() . TYPO3_mainDir, 2);
-            list($server, $address) = explode('/', $url, 2);
+            [, $url] = explode('://', $request->getAttribute('normalizedParams')->getSiteUrl() . TYPO3_mainDir, 2);
+            [$server, $address] = explode('/', $url, 2);
             return new RedirectResponse('https://' . $server . $sslPortSuffix . '/' . $address);
         }
 
index e7c0157..d87ab21 100644 (file)
@@ -174,7 +174,7 @@ class ModuleLoader
         // Check if this is a submodule
         $mainModule = '';
         if (strpos($name, '_') !== false) {
-            list($mainModule, ) = explode('_', $name, 2);
+            [$mainModule, ] = explode('_', $name, 2);
         }
 
         // check if there is a navigation component (like the pagetree)
index 2c47e65..2158fcc 100644 (file)
@@ -198,7 +198,7 @@ class LiveSearch
 
             $orderBy = $GLOBALS['TCA'][$tableName]['ctrl']['sortby'] ?: $GLOBALS['TCA'][$tableName]['ctrl']['default_sortby'];
             foreach (QueryHelper::parseOrderBy((string)$orderBy) as $orderPair) {
-                list($fieldName, $order) = $orderPair;
+                [$fieldName, $order] = $orderPair;
                 $queryBuilder->addOrderBy($fieldName, $order);
             }
 
index 6adf726..35ac60c 100644 (file)
@@ -49,7 +49,7 @@ class QueryParser
      */
     protected function extractKeyFromQuery($query)
     {
-        list($this->commandKey) = explode(':', substr($query, 1));
+        [$this->commandKey] = explode(':', substr($query, 1));
     }
 
     /**
index d167d01..ce73729 100644 (file)
@@ -69,8 +69,7 @@ class MetaInformation
                 $resourceObject = ResourceFactory::getInstance()->getObjectFromCombinedIdentifier($pageRecord['combined_identifier']);
                 $title = $resourceObject->getStorage()->getName() . ':';
                 $title .= $resourceObject->getParentFolder()->getReadablePath();
-            } catch (ResourceDoesNotExistException $e) {
-            } catch (InsufficientFolderAccessPermissionsException $e) {
+            } catch (ResourceDoesNotExistException|InsufficientFolderAccessPermissionsException $e) {
             }
         }
         // Setting the path of the page
index 2f7a905..d4da9d2 100644 (file)
@@ -609,7 +609,7 @@ function jumpToUrl(URL) {
                 foreach ($skinStylesheetDirs as $stylesheetDir) {
                     // for EXT:myskin/stylesheets/ syntax
                     if (strpos($stylesheetDir, 'EXT:') === 0) {
-                        list($extKey, $path) = explode('/', substr($stylesheetDir, 4), 2);
+                        [$extKey, $path] = explode('/', substr($stylesheetDir, 4), 2);
                         if (!empty($extKey) && ExtensionManagementUtility::isLoaded($extKey) && !empty($path)) {
                             $stylesheetDirectories[] = ExtensionManagementUtility::extPath($extKey) . $path;
                         }
index e7d3d3b..0fb5f9e 100644 (file)
@@ -883,7 +883,7 @@ abstract class AbstractTreeView
                 );
 
         foreach (QueryHelper::parseOrderBy($this->orderByFields) as $orderPair) {
-            list($fieldName, $order) = $orderPair;
+            [$fieldName, $order] = $orderPair;
             $queryBuilder->addOrderBy($fieldName, $order);
         }
 
index 3c9273e..2d20c49 100644 (file)
@@ -474,7 +474,7 @@ class FolderTreeView extends AbstractTreeView
         $out = '<ul class="list-tree list-tree-root">';
         // Evaluate AJAX request
         if (TYPO3_REQUESTTYPE & TYPO3_REQUESTTYPE_AJAX) {
-            list(, $expandCollapseCommand, $expandedFolderHash, ) = $this->evaluateExpandCollapseParameter();
+            [, $expandCollapseCommand, $expandedFolderHash, ] = $this->evaluateExpandCollapseParameter();
             if ($expandCollapseCommand == 1) {
                 $doExpand = true;
             } else {
@@ -594,7 +594,7 @@ class FolderTreeView extends AbstractTreeView
         // (If a plus/minus icon has been clicked,
         // the PM GET var is sent and we must update the stored positions in the tree):
         // 0: mount key, 1: set/clear boolean, 2: item ID (cannot contain "_"), 3: treeName
-        list($storageHashNumber, $doExpand, $numericFolderHash, $treeName) = $this->evaluateExpandCollapseParameter();
+        [$storageHashNumber, $doExpand, $numericFolderHash, $treeName] = $this->evaluateExpandCollapseParameter();
         if ($treeName && $treeName == $this->treeName) {
             if (in_array($storageHashNumber, $this->storageHashNumbers)) {
                 if ($doExpand == 1) {
@@ -665,9 +665,9 @@ class FolderTreeView extends AbstractTreeView
             }
         }
         // Take the first three parameters
-        list($mountKey, $doExpand, $folderIdentifier) = array_pad(explode('_', $PM, 3), 3, null);
+        [$mountKey, $doExpand, $folderIdentifier] = array_pad(explode('_', $PM, 3), 3, null);
         // In case the folder identifier contains "_", we just need to get the fourth/last parameter
-        list($folderIdentifier, $treeName) = array_pad(GeneralUtility::revExplode('_', $folderIdentifier, 2), 2, null);
+        [$folderIdentifier, $treeName] = array_pad(GeneralUtility::revExplode('_', $folderIdentifier, 2), 2, null);
         return [
             $mountKey,
             $doExpand,
index 5d5b64f..4879948 100644 (file)
@@ -199,7 +199,7 @@ class BackendUtility
      */
     public static function splitTable_Uid($str)
     {
-        list($uid, $table) = explode('_', strrev($str), 2);
+        [$uid, $table] = explode('_', strrev($str), 2);
         return [strrev($table), strrev($uid)];
     }
 
@@ -583,7 +583,7 @@ class BackendUtility
                     self::workspaceOL('pages', $pageinfo);
                     if (is_array($pageinfo)) {
                         self::fixVersioningPid('pages', $pageinfo);
-                        list($pageinfo['_thePath'], $pageinfo['_thePathFull']) = self::getRecordPath((int)$pageinfo['uid'], $perms_clause, 15, 1000);
+                        [$pageinfo['_thePath'], $pageinfo['_thePathFull']] = self::getRecordPath((int)$pageinfo['uid'], $perms_clause, 15, 1000);
                         return $pageinfo;
                     }
                 }
@@ -614,7 +614,7 @@ class BackendUtility
         if ($GLOBALS['TCA'][$table]) {
             $field = $GLOBALS['TCA'][$table]['ctrl']['type'];
             if (strpos($field, ':') !== false) {
-                list($pointerField, $foreignTableTypeField) = explode(':', $field);
+                [$pointerField, $foreignTableTypeField] = explode(':', $field);
                 // Get field value from database if field is not in the $row array
                 if (!isset($row[$pointerField])) {
                     $localRow = self::getRecord($table, $row['uid'], $pointerField);
@@ -743,7 +743,7 @@ class BackendUtility
                 // Traversing list
                 foreach ($includeTsConfigFileList as $key => $includeTsConfigFile) {
                     if (strpos($includeTsConfigFile, 'EXT:') === 0) {
-                        list($includeTsConfigFileExtensionKey, $includeTsConfigFilename) = explode(
+                        [$includeTsConfigFileExtensionKey, $includeTsConfigFilename] = explode(
                             '/',
                             substr($includeTsConfigFile, 4),
                             2
@@ -1462,7 +1462,7 @@ class BackendUtility
             if ($label === null) {
                 // Otherwise lookup the label in TCA items list
                 foreach ($GLOBALS['TCA'][$table]['columns'][$column]['config']['items'] as $itemConfiguration) {
-                    list($currentLabel, $currentKey) = $itemConfiguration;
+                    [$currentLabel, $currentKey] = $itemConfiguration;
                     if ((string)$key === (string)$currentKey) {
                         $label = $currentLabel;
                         break;
@@ -1907,7 +1907,7 @@ class BackendUtility
                             if (MathUtility::canBeInterpretedAsInteger($explodedValue)) {
                                 $relationTableNameForField = $relationTableName;
                             } else {
-                                list($relationTableNameForField, $explodedValue) = self::splitTable_Uid($explodedValue);
+                                [$relationTableNameForField, $explodedValue] = self::splitTable_Uid($explodedValue);
                             }
 
                             $relationRecord = static::getRecordWSOL($relationTableNameForField, $explodedValue);
@@ -3037,7 +3037,7 @@ class BackendUtility
         self::fixVersioningPid($table, $row);
         $res = [];
         // Get main config for the table
-        list($TScID, $cPid) = self::getTSCpid($table, $row['uid'], $row['pid']);
+        [$TScID, $cPid] = self::getTSCpid($table, $row['uid'], $row['pid']);
         if ($TScID >= 0) {
             $tsConfig = static::getPagesTSconfig($TScID)['TCEFORM.'][$table . '.'] ?? [];
             $typeVal = self::getTCAtypeValue($table, $row);
index dbc9ab9..65fb6c2 100644 (file)
@@ -103,7 +103,7 @@ class DataProviderCollection implements \TYPO3\CMS\Core\SingletonInterface
             $dataProviderIdentifier = 'default';
             $backendLayoutIdentifier = $combinedIdentifier;
         } else {
-            list($dataProviderIdentifier, $backendLayoutIdentifier) = explode('__', $combinedIdentifier, 2);
+            [$dataProviderIdentifier, $backendLayoutIdentifier] = explode('__', $combinedIdentifier, 2);
         }
 
         if (isset($this->dataProviders[$dataProviderIdentifier])) {
index 12db2d2..09e5e42 100644 (file)
@@ -730,7 +730,7 @@ class PageLayoutView implements LoggerAwareInterface
             // Items
             $this->eCounter = $this->firstElementNumber;
             // Creating elements:
-            list($flag, $code) = $this->fwd_rwd_nav();
+            [$flag, $code] = $this->fwd_rwd_nav();
             $out .= $code;
             $editUids = [];
             if ($flag) {
@@ -1500,7 +1500,7 @@ class PageLayoutView implements LoggerAwareInterface
         while ($row = $result->fetch()) {
             BackendUtility::workspaceOL($table, $row);
             if (is_array($row)) {
-                list($flag, $code) = $this->fwd_rwd_nav();
+                [$flag, $code] = $this->fwd_rwd_nav();
                 $out .= $code;
                 if ($flag) {
                     $Nrow = [];
index 2a7e53e..8bdc82a 100644 (file)
@@ -131,7 +131,7 @@ class TcaSelectItemsTest extends UnitTestCase
      */
     protected function mockDatabaseConnectionForProcessSelectField()
     {
-        list($queryBuilderProphet, $connectionPoolProphet) = $this->mockDatabaseConnection('foreignTable');
+        [$queryBuilderProphet, $connectionPoolProphet] = $this->mockDatabaseConnection('foreignTable');
 
         /** @var Statement|ObjectProphecy $statementProphet */
         $statementProphet = $this->prophesize(Statement::class);
@@ -1670,7 +1670,7 @@ class TcaSelectItemsTest extends UnitTestCase
         $fileRepositoryProphecy->findByRelation(Argument::cetera())->shouldNotBeCalled();
         GeneralUtility::setSingletonInstance(FileRepository::class, $fileRepositoryProphecy->reveal());
 
-        list($queryBuilderProphet, $connectionPoolProphet) = $this->mockDatabaseConnection();
+        [$queryBuilderProphet, $connectionPoolProphet] = $this->mockDatabaseConnection();
 
         /** @var Statement|ObjectProphecy $statementProphet */
         $statementProphet = $this->prophesize(Statement::class);
@@ -1766,7 +1766,7 @@ class TcaSelectItemsTest extends UnitTestCase
         $GLOBALS['BE_USER'] = $backendUserProphecy->reveal();
         $backendUserProphecy->getPagePermsClause(1)->shouldBeCalled()->willReturn(' 1=1');
 
-        list($queryBuilderProphet, $connectionPoolProphet) = $this->mockDatabaseConnection();
+        [$queryBuilderProphet, $connectionPoolProphet] = $this->mockDatabaseConnection();
 
         /** @var Statement|ObjectProphecy $statementProphet */
         $statementProphet = $this->prophesize(Statement::class);
@@ -1832,7 +1832,7 @@ class TcaSelectItemsTest extends UnitTestCase
         $GLOBALS['BE_USER'] = $backendUserProphecy->reveal();
         $backendUserProphecy->getPagePermsClause(1)->shouldBeCalled()->willReturn(' 1=1');
 
-        list($queryBuilderProphet, $connectionPoolProphet) = $this->mockDatabaseConnection();
+        [$queryBuilderProphet, $connectionPoolProphet] = $this->mockDatabaseConnection();
 
         /** @var Statement|ObjectProphecy $statementProphet */
         $statementProphet = $this->prophesize(Statement::class);
@@ -1916,7 +1916,7 @@ class TcaSelectItemsTest extends UnitTestCase
         $GLOBALS['BE_USER'] = $backendUserProphecy->reveal();
         $backendUserProphecy->getPagePermsClause(1)->shouldBeCalled()->willReturn(' 1=1');
 
-        list($queryBuilderProphet, $connectionPoolProphet) = $this->mockDatabaseConnection();
+        [$queryBuilderProphet, $connectionPoolProphet] = $this->mockDatabaseConnection();
 
         /** @var Statement|ObjectProphecy $statementProphet */
         $statementProphet = $this->prophesize(Statement::class);
@@ -2015,7 +2015,7 @@ class TcaSelectItemsTest extends UnitTestCase
         $GLOBALS['BE_USER'] = $backendUserProphecy->reveal();
         $backendUserProphecy->getPagePermsClause(1)->shouldBeCalled()->willReturn(' 1=1');
 
-        list($queryBuilderProphet, $connectionPoolProphet) = $this->mockDatabaseConnection();
+        [$queryBuilderProphet, $connectionPoolProphet] = $this->mockDatabaseConnection();
 
         /** @var Statement|ObjectProphecy $statementProphet */
         $statementProphet = $this->prophesize(Statement::class);
index 5829287..fa0886b 100644 (file)
@@ -1710,7 +1710,7 @@ class BackendUserAuthentication extends AbstractUserAuthentication
         if ($this->workspace <= 0 || empty($this->workspaceRec['file_mountpoints'])) {
             // If userHomePath is set, we attempt to mount it
             if ($GLOBALS['TYPO3_CONF_VARS']['BE']['userHomePath']) {
-                list($userHomeStorageUid, $userHomeFilter) = explode(':', $GLOBALS['TYPO3_CONF_VARS']['BE']['userHomePath'], 2);
+                [$userHomeStorageUid, $userHomeFilter] = explode(':', $GLOBALS['TYPO3_CONF_VARS']['BE']['userHomePath'], 2);
                 $userHomeStorageUid = (int)$userHomeStorageUid;
                 $userHomeFilter = '/' . ltrim($userHomeFilter, '/');
                 if ($userHomeStorageUid > 0) {
@@ -1738,7 +1738,7 @@ class BackendUserAuthentication extends AbstractUserAuthentication
             // Mount group home-dirs
             if ((is_array($this->user) && $this->user['options'] & Permission::PAGE_EDIT) == 2 && $GLOBALS['TYPO3_CONF_VARS']['BE']['groupHomePath'] != '') {
                 // If groupHomePath is set, we attempt to mount it
-                list($groupHomeStorageUid, $groupHomeFilter) = explode(':', $GLOBALS['TYPO3_CONF_VARS']['BE']['groupHomePath'], 2);
+                [$groupHomeStorageUid, $groupHomeFilter] = explode(':', $GLOBALS['TYPO3_CONF_VARS']['BE']['groupHomePath'], 2);
                 $groupHomeStorageUid = (int)$groupHomeStorageUid;
                 $groupHomeFilter = '/' . ltrim($groupHomeFilter, '/');
                 if ($groupHomeStorageUid > 0) {
index 86d3d74..876094e 100644 (file)
@@ -168,7 +168,7 @@ class MemcachedBackend extends AbstractBackend implements TaggableBackendInterfa
                     $server = substr($server, 6);
                 }
                 if (strpos($server, ':') !== false) {
-                    list($host, $port) = explode(':', $server, 2);
+                    [$host, $port] = explode(':', $server, 2);
                 } else {
                     $host = $server;
                     $port = $defaultPort;
@@ -284,7 +284,7 @@ class MemcachedBackend extends AbstractBackend implements TaggableBackendInterfa
     {
         $value = $this->memcache->get($this->identifierPrefix . $entryIdentifier);
         if (is_string($value) && strpos($value, 'TYPO3*chunked:') === 0) {
-            list(, $chunkCount) = explode(':', $value);
+            [, $chunkCount] = explode(':', $value);
             $value = '';
             for ($chunkNumber = 1; $chunkNumber < $chunkCount; $chunkNumber++) {
                 $value .= $this->memcache->get($this->identifierPrefix . $entryIdentifier . '_chunk_' . $chunkNumber);
index 8e305d6..563a2e7 100644 (file)
@@ -487,7 +487,7 @@ class RedisBackend extends AbstractBackend implements TaggableBackendInterface
     {
         $identifierToTagsKeys = $this->redis->keys(self::IDENTIFIER_TAGS_PREFIX . '*');
         foreach ($identifierToTagsKeys as $identifierToTagsKey) {
-            list(, $identifier) = explode(':', $identifierToTagsKey);
+            [, $identifier] = explode(':', $identifierToTagsKey);
             // Check if the data entry still exists
             if (!$this->redis->exists(self::IDENTIFIER_DATA_PREFIX . $identifier)) {
                 $tagsToRemoveIdentifierFrom = $this->redis->sMembers($identifierToTagsKey);
index 72cb82e..9a2b30a 100644 (file)
@@ -446,7 +446,7 @@ class CharsetConverter implements SingletonInterface
                             $hexbyte = '';
                             $utf8 = '';
                             if ($detectedType === 'ms-token') {
-                                list($hexbyte, $utf8) = preg_split('/[=:]/', $value, 3);
+                                [$hexbyte, $utf8] = preg_split('/[=:]/', $value, 3);
                             } elseif ($detectedType === 'whitespaced') {
                                 $regA = [];
                                 preg_match('/[[:space:]]*0x([[:alnum:]]*)[[:space:]]+0x([[:alnum:]]*)[[:space:]]+/', $value, $regA);
@@ -512,7 +512,7 @@ class CharsetConverter implements SingletonInterface
         while (!feof($fh)) {
             $line = fgets($fh, 4096);
             // Has a lot of info
-            list($char, $name, $cat, , , $decomp, , , $num) = explode(';', rtrim($line));
+            [$char, $name, $cat, , , $decomp, , , $num] = explode(';', rtrim($line));
             $ord = hexdec($char);
             if ($ord > 65535) {
                 // Only process the BMP
@@ -578,7 +578,7 @@ class CharsetConverter implements SingletonInterface
                         continue;
                     }
                     if ($line[0] !== '#' && trim($line) !== '') {
-                        list($char, $translit) = GeneralUtility::trimExplode(';', $line);
+                        [$char, $translit] = GeneralUtility::trimExplode(';', $line);
                         if (!$translit) {
                             $omit['U+' . $char] = 1;
                         }
index cbe095c..c418d79 100644 (file)
@@ -221,7 +221,7 @@ class SlotReplacement
 
     public function onResourceStorageEmitSanitizeFileNameSignal(SanitizeFileNameEvent $event): void
     {
-        list($fileName) = $this->signalSlotDispatcher->dispatch(
+        [$fileName] = $this->signalSlotDispatcher->dispatch(
             ResourceStorage::class,
             ResourceStorage::SIGNAL_SanitizeFileName,
             [
@@ -635,7 +635,7 @@ class SlotReplacement
 
     public function onExtensionManagementUtilityTcaIsBeingBuilt(AfterTcaCompilationEvent $event): void
     {
-        list($tca) = $this->signalSlotDispatcher->dispatch(
+        [$tca] = $this->signalSlotDispatcher->dispatch(
             ExtensionManagementUtility::class,
             'tcaIsBeingBuilt',
             [
index de8be98..6e1924d 100644 (file)
@@ -372,7 +372,7 @@ class FlexFormTools
                     1464116002
                 );
             }
-            list($foreignTableName, $foreignFieldName) = GeneralUtility::trimExplode(':', $fieldTca['config']['ds_tableField']);
+            [$foreignTableName, $foreignFieldName] = GeneralUtility::trimExplode(':', $fieldTca['config']['ds_tableField']);
             $dataStructureIdentifier = [
                 'type' => 'record',
                 'tableName' => $foreignTableName,
@@ -779,11 +779,7 @@ class FlexFormTools
         try {
             $dataStructureIdentifier = $this->getDataStructureIdentifier($GLOBALS['TCA'][$table]['columns'][$field], $table, $field, $row);
             $dataStructureArray = $this->parseDataStructureByIdentifier($dataStructureIdentifier);
-        } catch (InvalidParentRowException $e) {
-        } catch (InvalidParentRowLoopException $e) {
-        } catch (InvalidParentRowRootException $e) {
-        } catch (InvalidPointerFieldValueException $e) {
-        } catch (InvalidIdentifierException $e) {
+        } catch (InvalidParentRowException|InvalidParentRowLoopException|InvalidParentRowRootException|InvalidPointerFieldValueException|InvalidIdentifierException $e) {
         }
 
         // Get flexform XML data
index 2f0630a..41fe452 100644 (file)
@@ -69,7 +69,7 @@ class IconController
         $queryParams = $request->getQueryParams();
         $requestedIcon = json_decode($parsedBody['icon'] ?? $queryParams['icon'], true);
 
-        list($identifier, $size, $overlayIdentifier, $iconState, $alternativeMarkupIdentifier) = $requestedIcon;
+        [$identifier, $size, $overlayIdentifier, $iconState, $alternativeMarkupIdentifier] = $requestedIcon;
 
         if (empty($overlayIdentifier)) {
             $overlayIdentifier = null;
index 526131d..0c8f066 100644 (file)
@@ -362,7 +362,7 @@ class SystemEnvironmentBuilder
     {
         $entryScriptDirectory = PathUtility::dirnameDuringBootstrap($scriptPath);
         if ($entryPointLevel > 0) {
-            list($rootPath) = GeneralUtility::revExplode('/', $entryScriptDirectory, $entryPointLevel + 1);
+            [$rootPath] = GeneralUtility::revExplode('/', $entryScriptDirectory, $entryPointLevel + 1);
         } else {
             $rootPath = $entryScriptDirectory;
         }
index 0e9d748..fb4892e 100644 (file)
@@ -1054,7 +1054,7 @@ class DataHandler implements LoggerAwareInterface
                 }
 
                 // Here the "pid" is set IF NOT the old pid was a string pointing to a place in the subst-id array.
-                list($tscPID) = BackendUtility::getTSCpid($table, $id, $old_pid_value ?: $fieldArray['pid']);
+                [$tscPID] = BackendUtility::getTSCpid($table, $id, $old_pid_value ?: $fieldArray['pid']);
                 if ($status === 'new' && $table === 'pages') {
                     $TSConfig = BackendUtility::getPagesTSconfig($tscPID)['TCEMAIN.'] ?? [];
                     if (isset($TSConfig['permissions.']) && is_array($TSConfig['permissions.'])) {
@@ -2160,11 +2160,7 @@ class DataHandler implements LoggerAwareInterface
                 );
 
                 $dataStructureArray = $flexFormTools->parseDataStructureByIdentifier($dataStructureIdentifier);
-            } catch (InvalidParentRowException $e) {
-            } catch (InvalidParentRowLoopException $e) {
-            } catch (InvalidParentRowRootException $e) {
-            } catch (InvalidPointerFieldValueException $e) {
-            } catch (InvalidIdentifierException $e) {
+            } catch (InvalidParentRowException|InvalidParentRowLoopException|InvalidParentRowRootException|InvalidPointerFieldValueException|InvalidIdentifierException $e) {
             }
 
             // Get current value array:
@@ -2275,7 +2271,7 @@ class DataHandler implements LoggerAwareInterface
      */
     public function checkValue_inline($res, $value, $tcaFieldConf, $PP, $field, array $additionalData = null)
     {
-        list($table, $id, , $status) = $PP;
+        [$table, $id, , $status] = $PP;
         $this->checkValueForInline($res, $value, $tcaFieldConf, $table, $id, $status, $field, $additionalData);
     }
 
@@ -2904,7 +2900,7 @@ class DataHandler implements LoggerAwareInterface
                         }
                     } else {
                         // Default
-                        list($CVtable, $CVid, $CVcurValue, $CVstatus, $CVrealPid, $CVrecFID, $CVtscPID) = $pParams;
+                        [$CVtable, $CVid, $CVcurValue, $CVstatus, $CVrealPid, $CVrecFID, $CVtscPID] = $pParams;
 
                         $additionalData = [
                             'flexFormId' => $CVrecFID,
@@ -3778,7 +3774,7 @@ class DataHandler implements LoggerAwareInterface
     public function copyRecord_flexFormCallBack($pParams, $dsConf, $dataValue, $_1, $_2, $_3, $workspaceOptions)
     {
         // Extract parameters:
-        list($table, $uid, $field, $realDestPid) = $pParams;
+        [$table, $uid, $field, $realDestPid] = $pParams;
         // If references are set for this field, set flag so they can be corrected later (in ->remapListedDBRecords())
         if (($this->isReferenceField($dsConf) || $this->getInlineFieldType($dsConf) !== false) && (string)$dataValue !== '') {
             $dataValue = $this->copyRecord_procBasedOnFieldType($table, $uid, $field, $dataValue, [], $dsConf, $realDestPid, 0, $workspaceOptions);
@@ -4034,7 +4030,7 @@ class DataHandler implements LoggerAwareInterface
         if ($destPid >= 0) {
             if ($table !== 'pages' || $this->destNotInsideSelf($destPid, $uid)) {
                 // Clear cache before moving
-                list($parentUid) = BackendUtility::getTSCpid($table, $uid, '');
+                [$parentUid] = BackendUtility::getTSCpid($table, $uid, '');
                 $this->registerRecordIdForPageCacheClearing($table, $uid, $parentUid);
                 // Setting PID
                 $updateFields['pid'] = $destPid;
@@ -4379,7 +4375,7 @@ class DataHandler implements LoggerAwareInterface
             // Check if we are just prefixing:
             if ($fCfg['l10n_mode'] === 'prefixLangTitle') {
                 if (($fCfg['config']['type'] === 'text' || $fCfg['config']['type'] === 'input') && (string)$row[$fN] !== '') {
-                    list($tscPID) = BackendUtility::getTSCpid($table, $uid, '');
+                    [$tscPID] = BackendUtility::getTSCpid($table, $uid, '');
                     $TSConfig = BackendUtility::getPagesTSconfig($tscPID)['TCEMAIN.'] ?? [];
                     $tE = $this->getTableEntries($table, $TSConfig);
                     if (!empty($TSConfig['translateToMessage']) && !$tE['disablePrependAtCopy']) {
@@ -4724,7 +4720,7 @@ class DataHandler implements LoggerAwareInterface
         }
 
         // Clear cache before deleting the record, else the correct page cannot be identified by clear_cache
-        list($parentUid) = BackendUtility::getTSCpid($table, $uid, '');
+        [$parentUid] = BackendUtility::getTSCpid($table, $uid, '');
         $this->registerRecordIdForPageCacheClearing($table, $uid, $parentUid);
         $deleteField = $GLOBALS['TCA'][$table]['ctrl']['delete'];
         $databaseErrorMessage = '';
@@ -5332,7 +5328,7 @@ class DataHandler implements LoggerAwareInterface
     public function version_remapMMForVersionSwap_flexFormCallBack($pParams, $dsConf, $dataValue, $dataValue_ext1, $dataValue_ext2, $path)
     {
         // Extract parameters:
-        list($table, $uid, $field) = $pParams;
+        [$table, $uid, $field] = $pParams;
         if ($this->isReferenceField($dsConf)) {
             $allowedTables = $dsConf['type'] === 'group' ? $dsConf['allowed'] : $dsConf['foreign_table'];
             $prependName = $dsConf['type'] === 'group' ? $dsConf['prepend_tname'] : '';
@@ -5474,7 +5470,7 @@ class DataHandler implements LoggerAwareInterface
     public function remapListedDBRecords_flexFormCallBack($pParams, $dsConf, $dataValue, $dataValue_ext1, $dataValue_ext2)
     {
         // Extract parameters:
-        list($table, $uid, $field) = $pParams;
+        [$table, $uid, $field] = $pParams;
         // If references are set for this field, set flag so they can be corrected later:
         if ($this->isReferenceField($dsConf) && (string)$dataValue !== '') {
             $vArray = $this->remapListedDBRecords_procDBRefs($dsConf, $dataValue, $uid, $table);
@@ -5777,7 +5773,7 @@ class DataHandler implements LoggerAwareInterface
      */
     protected function updateFlexFormData($flexFormId, array $modifications)
     {
-        list($table, $uid, $field) = explode(':', $flexFormId, 3);
+        [$table, $uid, $field] = explode(':', $flexFormId, 3);
 
         if (!MathUtility::canBeInterpretedAsInteger($uid) && !empty($this->substNEWwithIDs[$uid])) {
             $uid = $this->substNEWwithIDs[$uid];
@@ -7371,7 +7367,7 @@ class DataHandler implements LoggerAwareInterface
         if (isset(self::$recordPidsForDeletedRecords[$table][$uid])) {
             return self::$recordPidsForDeletedRecords[$table][$uid];
         }
-        list($parentUid) = BackendUtility::getTSCpid($table, $uid, '');
+        [$parentUid] = BackendUtility::getTSCpid($table, $uid, '');
         return [$parentUid];
     }
 
@@ -7870,7 +7866,7 @@ class DataHandler implements LoggerAwareInterface
                 // For move commands we may get more then 1 parent.
                 $pageUids = $this->getOriginalParentOfRecord($table, $uid);
                 foreach ($pageUids as $originalParent) {
-                    list($tagsToClearFromPrepare, $clearCacheCommandsFromPrepare)
+                    [$tagsToClearFromPrepare, $clearCacheCommandsFromPrepare]
                         = $this->prepareCacheFlush($table, $uid, $originalParent);
                     $tagsToClear = array_merge($tagsToClear, $tagsToClearFromPrepare);
                     $clearCacheCommands = array_merge($clearCacheCommands, $clearCacheCommandsFromPrepare);
index f2d6b6a..b1cbb45 100644 (file)
@@ -413,7 +413,7 @@ class DataMapItem
             return $idValue;
         }
         // @todo Handle if $tableName does not match $this->tableName
-        list($tableName, $id) = BackendUtility::splitTable_Uid($idValue);
+        [$tableName, $id] = BackendUtility::splitTable_Uid($idValue);
         return $id;
     }
 
index 9a6ec0e..1659835 100644 (file)
@@ -1335,7 +1335,7 @@ class DataMapProcessor
 
         $languageService = $this->getLanguageService();
         $languageRecord = BackendUtility::getRecord('sys_language', $language, 'title');
-        list($pageId) = BackendUtility::getTSCpid($tableName, $fromId, $data['pid'] ?? null);
+        [$pageId] = BackendUtility::getTSCpid($tableName, $fromId, $data['pid'] ?? null);
 
         $tsConfigTranslateToMessage = BackendUtility::getPagesTSconfig($pageId)['TCEMAIN.']['translateToMessage'] ?? '';
         if (!empty($tsConfigTranslateToMessage)) {
index 7a210f0..bf6fc35 100644 (file)
@@ -984,7 +984,7 @@ class QueryBuilder
     public function quoteIdentifiersForSelect(array $input): array
     {
         foreach ($input as &$select) {
-            list($fieldName, $alias, $suffix) = array_pad(
+            [$fieldName, $alias, $suffix] = array_pad(
                 GeneralUtility::trimExplode(
                     ' AS ',
                     str_ireplace(' as ', ' AS ', $select),
index e2105a9..a5e82d2 100644 (file)
@@ -1645,7 +1645,7 @@ class QueryGenerator
         }
         if ($this->extFieldLists['queryOrder']) {
             foreach (QueryHelper::parseOrderBy($this->extFieldLists['queryOrder_SQL']) as $orderPair) {
-                list($fieldName, $order) = $orderPair;
+                [$fieldName, $order] = $orderPair;
                 $queryBuilder->addOrderBy($fieldName, $order);
             }
         }
index 692e864..f5151fb 100644 (file)
@@ -594,7 +594,7 @@ class ReferenceIndex implements LoggerAwareInterface
                     if (is_array($el['subst'])) {
                         switch ((string)$el['subst']['type']) {
                             case 'db':
-                                list($referencedTable, $referencedUid) = explode(':', $el['subst']['recordRef']);
+                                [$referencedTable, $referencedUid] = explode(':', $el['subst']['recordRef']);
                                 $this->relations[] = $this->createEntryDataUsingRecord($tableName, $record, $fieldName, $flexPointer, $deleted, $referencedTable, (int)$referencedUid, '', -1, $spKey, $subKey);
                                 break;
                             case 'string':
@@ -710,7 +710,7 @@ class ReferenceIndex implements LoggerAwareInterface
         $structurePath = substr($structurePath, 5) . '/';
         $dsConf = $dsArr['TCEforms']['config'];
         // Implode parameter values:
-        list($table, $uid, $field) = [
+        [$table, $uid, $field] = [
             $PA['table'],
             $PA['uid'],
             $PA['field']
@@ -934,7 +934,7 @@ class ReferenceIndex implements LoggerAwareInterface
             if ($newValue === null) {
                 unset($itemArray[$refRec['sorting']]);
             } else {
-                list($itemArray[$refRec['sorting']]['table'], $itemArray[$refRec['sorting']]['id']) = explode(':', $newValue);
+                [$itemArray[$refRec['sorting']]['table'], $itemArray[$refRec['sorting']]['id']] = explode(':', $newValue);
             }
             // Traverse and compile new list of records:
             $saveValue = [];
index 425fa79..240f182 100644 (file)
@@ -501,7 +501,7 @@ class RelationHandler
                         )
                     );
                 foreach (QueryHelper::parseOrderBy((string)$sortby) as $orderPair) {
-                    list($fieldName, $order) = $orderPair;
+                    [$fieldName, $order] = $orderPair;
                     $queryBuilder->addOrderBy($fieldName, $order);
                 }
                 $statement = $queryBuilder->execute();
@@ -1007,7 +1007,7 @@ class RelationHandler
 
         if (!empty($sortby)) {
             foreach (QueryHelper::parseOrderBy($sortby) as $orderPair) {
-                list($fieldName, $sorting) = $orderPair;
+                [$fieldName, $sorting] = $orderPair;
                 $queryBuilder->addOrderBy($fieldName, $sorting);
             }
         }
@@ -1118,7 +1118,7 @@ class RelationHandler
                         } else {
                             $tempSortBy = [];
                             foreach (QueryHelper::parseOrderBy($sortby) as $orderPair) {
-                                list($fieldName, $order) = $orderPair;
+                                [$fieldName, $order] = $orderPair;
                                 if ($order !== null) {
                                     $tempSortBy[] = implode(' ', $orderPair);
                                 } else {
index 2ba9bb8..5cee12a 100644 (file)
@@ -197,7 +197,7 @@ class SchemaMigrator
             // Only handle insert statements and extract the table at the same time. Extracting
             // the table name is required to perform the inserts on the right connection.
             if (preg_match('/^INSERT\s+INTO\s+`?(\w+)`?(.*)/i', $statement, $matches)) {
-                list(, $tableName, $sqlFragment) = $matches;
+                [, $tableName, $sqlFragment] = $matches;
                 $insertStatements[$tableName][] = sprintf(
                     'INSERT INTO %s %s',
                     $connectionPool->getConnectionForTable($tableName)->quoteIdentifier($tableName),
index 239c647..f5900dc 100644 (file)
@@ -542,7 +542,7 @@ class SoftReferenceIndex implements SingletonInterface
                     // Output content will be the token instead:
                     $content = '{softref:' . $tokenID . '}';
                 } elseif ($tLP['identifier']) {
-                    list($linkHandlerKeyword, $linkHandlerValue) = explode(':', trim($tLP['identifier']), 2);
+                    [$linkHandlerKeyword, $linkHandlerValue] = explode(':', trim($tLP['identifier']), 2);
                     if (MathUtility::canBeInterpretedAsInteger($linkHandlerValue)) {
                         // Token and substitute value
                         $elements[$tokenID . ':' . $idx]['subst'] = [
index eac3daa..8434782 100644 (file)
@@ -41,7 +41,7 @@ class AutowireInjectMethodsPass extends AbstractRecursivePass
 
         $alreadyCalledMethods = [];
 
-        foreach ($value->getMethodCalls() as list($method)) {
+        foreach ($value->getMethodCalls() as [$method]) {
             $alreadyCalledMethods[strtolower($method)] = true;
         }
 
index adca791..2fd3ee9 100644 (file)
@@ -249,7 +249,7 @@ class HtmlParser
      */
     public function get_tag_attributes($tag, $deHSC = false)
     {
-        list($components, $metaC) = $this->split_tag_attributes($tag);
+        [$components, $metaC] = $this->split_tag_attributes($tag);
         // Attribute name is stored here
         $name = '';
         $valuemode = false;
index 0ee8b66..508e54e 100644 (file)
@@ -310,7 +310,7 @@ class RteHtmlParser extends HtmlParser implements LoggerAwareInterface
     protected function runHtmlParserIfConfigured($content, $configurationDirective)
     {
         if (!empty($this->procOptions[$configurationDirective])) {
-            list($keepTags, $keepNonMatchedTags, $hscMode, $additionalConfiguration) = $this->HTMLparserConfig($this->procOptions[$configurationDirective . '.']);
+            [$keepTags, $keepNonMatchedTags, $hscMode, $additionalConfiguration] = $this->HTMLparserConfig($this->procOptions[$configurationDirective . '.']);
             $content = $this->HTMLcleaner($content, $keepTags, $keepNonMatchedTags, $hscMode, $additionalConfiguration);
         }
         return $content;
@@ -337,7 +337,7 @@ class RteHtmlParser extends HtmlParser implements LoggerAwareInterface
         $blockSplit = $this->splitIntoBlock('A', $value);
         foreach ($blockSplit as $k => $v) {
             if ($k % 2) {
-                list($tagAttributes) = $this->get_tag_attributes($this->getFirstTag($v), true);
+                [$tagAttributes] = $this->get_tag_attributes($this->getFirstTag($v), true);
 
                 // Anchors would not have an href attribute
                 if (!isset($tagAttributes['href'])) {
@@ -540,7 +540,7 @@ class RteHtmlParser extends HtmlParser implements LoggerAwareInterface
                 case 'rte':
                     // Transforming keepTags array so it can be understood by the HTMLcleaner function.
                     // This basically converts the format of the array from TypoScript (having dots) to plain multi-dimensional array.
-                    list($keepTags) = $this->HTMLparserConfig($this->procOptions['HTMLparser_rte.'] ?? [], $keepTags);
+                    [$keepTags] = $this->HTMLparserConfig($this->procOptions['HTMLparser_rte.'] ?? [], $keepTags);
                     break;
                 case 'db':
                     // Setting up span tags if they are allowed:
@@ -567,7 +567,7 @@ class RteHtmlParser extends HtmlParser implements LoggerAwareInterface
                         $TSc['noAttrib'] = 'b,i,u,br,center,hr,sub,sup,strong,em,li,ul,ol,blockquote,strike';
                     }
                     // Transforming the array from TypoScript to regular array:
-                    list($keepTags) = $this->HTMLparserConfig($TSc, $keepTags);
+                    [$keepTags] = $this->HTMLparserConfig($TSc, $keepTags);
                     break;
             }
             // Caching (internally, in object memory) the result
@@ -695,7 +695,7 @@ class RteHtmlParser extends HtmlParser implements LoggerAwareInterface
         $fTag = $this->getFirstTag($fullContentWithTag);
         // Check which attributes of the <p> tag to keep attributes
         if (!empty($this->allowedAttributesForParagraphTags)) {
-            list($tagAttributes) = $this->get_tag_attributes($fTag);
+            [$tagAttributes] = $this->get_tag_attributes($fTag);
             // Make sure the tag attributes only contain the ones that are defined to be allowed
             $tagAttributes = array_intersect_key($tagAttributes, array_flip($this->allowedAttributesForParagraphTags));
 
@@ -813,7 +813,7 @@ class RteHtmlParser extends HtmlParser implements LoggerAwareInterface
             if ($position % 2 === 0) {
                 continue;
             }
-            list($attributes) = $this->get_tag_attributes($this->getFirstTag($value), true);
+            [$attributes] = $this->get_tag_attributes($this->getFirstTag($value), true);
             if (empty($attributes['href'])) {
                 continue;
             }
@@ -848,7 +848,7 @@ class RteHtmlParser extends HtmlParser implements LoggerAwareInterface
             if ($position % 2 === 0) {
                 continue;
             }
-            list($attributes) = $this->get_tag_attributes($this->getFirstTag($value), true);
+            [$attributes] = $this->get_tag_attributes($this->getFirstTag($value), true);
             if (empty($attributes['href'])) {
                 continue;
             }
index d2998b2..1d1defd 100644 (file)
@@ -81,7 +81,7 @@ class Dispatcher implements DispatcherInterface
 
         // Check if the target is a concatenated string of "className::actionMethod"
         if (is_string($target) && strpos($target, '::') !== false) {
-            list($className, $methodName) = explode('::', $target, 2);
+            [$className, $methodName] = explode('::', $target, 2);
             $targetObject = $this->container->has($className) ? $this->container->get($className) : GeneralUtility::makeInstance($className);
             return [$targetObject, $methodName];
         }
index d0f188e..c2c2ce3 100644 (file)
@@ -667,7 +667,7 @@ class NormalizedParams
             // This is for URL rewriter that store the original URI in a server
             // variable (e.g. ISAPI Rewriter for IIS: HTTP_X_REWRITE_URL), a config then looks like:
             // requestURIvar = '_SERVER|HTTP_X_REWRITE_URL' which will access $GLOBALS['_SERVER']['HTTP_X_REWRITE_URL']
-            list($firstLevel, $secondLevel) = GeneralUtility::trimExplode('|', $configuration['requestURIvar'], true);
+            [$firstLevel, $secondLevel] = GeneralUtility::trimExplode('|', $configuration['requestURIvar'], true);
             $requestUri = $GLOBALS[$firstLevel][$secondLevel];
         } elseif (empty($serverParams['REQUEST_URI'])) {
             // This is for ISS/CGI which does not have the REQUEST_URI available.
index 22b404c..b8aacd4 100644 (file)
@@ -108,7 +108,7 @@ class Request extends Message implements RequestInterface
         $this->method = $method;
         $this->uri    = $uri;
         $this->body   = $body;
-        list($this->lowercasedHeaderNames, $headers) = $this->filterHeaders($headers);
+        [$this->lowercasedHeaderNames, $headers] = $this->filterHeaders($headers);
         $this->assertHeaders($headers);
         $this->headers = $headers;
     }
index aa19143..f82d623 100644 (file)
@@ -141,7 +141,7 @@ class Response extends Message implements ResponseInterface
         $this->statusCode = (int)$statusCode;
 
         $this->reasonPhrase = $reasonPhrase === '' ? $this->availableStatusCodes[$this->statusCode] : $reasonPhrase;
-        list($this->lowercasedHeaderNames, $headers) = $this->filterHeaders($headers);
+        [$this->lowercasedHeaderNames, $headers] = $this->filterHeaders($headers);
         $this->assertHeaders($headers);
         $this->headers = $headers;
     }
index 30d9fbb..e0cb984 100644 (file)
@@ -677,7 +677,7 @@ class Uri implements UriInterface
 
         $parts = explode('&', $query);
         foreach ($parts as $index => $part) {
-            list($key, $value) = $this->splitQueryValue($part);
+            [$key, $value] = $this->splitQueryValue($part);
             if ($value === null) {
                 $parts[$index] = $this->sanitizeQueryOrFragment($key);
                 continue;
index fc98081..9de1971 100644 (file)
@@ -578,7 +578,7 @@ class GraphicalFunctions
     public function makeText(&$im, $conf, $workArea)
     {
         // Spacing
-        list($spacing, $wordSpacing) = $this->calcWordSpacing($conf);
+        [$spacing, $wordSpacing] = $this->calcWordSpacing($conf);
         // Position
         $txtPos = $this->txtPosition($conf, $workArea, $conf['BBOX']);
         $theText = $conf['text'];
@@ -729,7 +729,7 @@ class GraphicalFunctions
     public function calcBBox($conf)
     {
         $sF = $this->getTextScalFactor($conf);
-        list($spacing, $wordSpacing) = $this->calcWordSpacing($conf, $sF);
+        [$spacing, $wordSpacing] = $this->calcWordSpacing($conf, $sF);
         $theText = $conf['text'];
         $charInf = $this->ImageTTFBBoxWrapper($conf['fontSize'], $conf['angle'], $conf['fontFile'], $theText, $conf['splitRendering.'], $sF);
         $theBBoxInfo = $charInf;
@@ -901,7 +901,7 @@ class GraphicalFunctions
     {
         // You have to use +calc options like [10.h] in 'offset' to get the right position of your text-image, if you use +calc in XY height!!!!
         $maxWidth = (int)$conf['maxWidth'];
-        list($spacing, $wordSpacing) = $this->calcWordSpacing($conf);
+        [$spacing, $wordSpacing] = $this->calcWordSpacing($conf);
         if ($maxWidth) {
             // If any kind of spacing applys, we use this function:
             if ($spacing || $wordSpacing) {
index 21eb39f..e2b871c 100644 (file)
@@ -79,12 +79,12 @@ class LegacyLinkNotationConverter
             $result['telephone'] = $linkParameter;
         } elseif (strpos($linkParameter, ':') !== false) {
             // Check for link-handler keyword
-            list($linkHandlerKeyword, $linkHandlerValue) = explode(':', $linkParameter, 2);
+            [$linkHandlerKeyword, $linkHandlerValue] = explode(':', $linkParameter, 2);
             $result['type'] = strtolower(trim($linkHandlerKeyword));
             $result['url'] = $linkParameter;
             $result['value'] = $linkHandlerValue;
             if ($result['type'] === LinkService::TYPE_RECORD) {
-                list($a['identifier'], $tableAndUid) = explode(':', $linkHandlerValue, 2);
+                [$a['identifier'], $tableAndUid] = explode(':', $linkHandlerValue, 2);
                 $tableAndUid = explode(':', $tableAndUid);
                 if (count($tableAndUid) > 1) {
                     $a['table'] = $tableAndUid[0];
@@ -112,7 +112,7 @@ class LegacyLinkNotationConverter
             $containsSlash = false;
             if (!$isIdOrAlias) {
                 // Detects if a file is found in site-root and if so it will be treated like a normal file.
-                list($rootFileDat) = explode('?', rawurldecode($linkParameter));
+                [$rootFileDat] = explode('?', rawurldecode($linkParameter));
                 $containsSlash = strpos($rootFileDat, '/') !== false;
                 $pathInfo = pathinfo($rootFileDat);
                 $fileExtension = strtolower($pathInfo['extension'] ?? '');
@@ -164,13 +164,13 @@ class LegacyLinkNotationConverter
     {
         $result = ['type' => LinkService::TYPE_PAGE];
         if (strpos($data, '#') !== false) {
-            list($data, $result['fragment']) = explode('#', $data, 2);
+            [$data, $result['fragment']] = explode('#', $data, 2);
         }
         // check for additional parameters
         if (strpos($data, '?') !== false) {
-            list($data, $result['parameters']) = explode('?', $data, 2);
+            [$data, $result['parameters']] = explode('?', $data, 2);
         } elseif (strpos($data, '&') !== false) {
-            list($data, $result['parameters']) = explode('&', $data, 2);
+            [$data, $result['parameters']] = explode('&', $data, 2);
         }
         if (empty($data)) {
             $result['pageuid'] = 'current';
@@ -179,7 +179,7 @@ class LegacyLinkNotationConverter
             $result['fragment'] = substr($data, 1);
         } elseif (strpos($data, ',') !== false) {
             $data = rtrim($data, ',');
-            list($result['pageuid'], $result['pagetype']) = explode(',', $data, 2);
+            [$result['pageuid'], $result['pagetype']] = explode(',', $data, 2);
         } elseif (strpos($data, '/') !== false) {
             $data = explode('/', trim($data, '/'));
             $result['pageuid'] = array_shift($data);
index 2a7c4b6..8a37fa7 100644 (file)
@@ -236,7 +236,7 @@ class Locales implements SingletonInterface
         foreach ($preferredLanguages as $preferredLanguage) {
             $quality = 1.0;
             if (strpos($preferredLanguage, ';q=') !== false) {
-                list($preferredLanguage, $quality) = explode(';q=', $preferredLanguage);
+                [$preferredLanguage, $quality] = explode(';q=', $preferredLanguage);
             }
             $sortedPreferredLanguages[$preferredLanguage] = $quality;
         }
@@ -248,7 +248,7 @@ class Locales implements SingletonInterface
                 break;
             }
             // Strip the country code from the end
-            list($preferredLanguage, ) = explode('-', $preferredLanguage);
+            [$preferredLanguage, ] = explode('-', $preferredLanguage);
             if (isset($allLanguageCodesFromLocales[$preferredLanguage])) {
                 $selectedLanguage = $allLanguageCodesFromLocales[$preferredLanguage];
                 break;
index 4519e0c..f2c85bc 100644 (file)
@@ -122,13 +122,13 @@ abstract class AbstractXmlParser implements LocalizationParserInterface
         }
         if ($validatedPrefix) {
             // Divide file reference into extension key, directory (if any) and base name:
-            list($extensionKey, $file_extPath) = explode('/', substr($fileRef, strlen($validatedPrefix)), 2);
+            [$extensionKey, $file_extPath] = explode('/', substr($fileRef, strlen($validatedPrefix)), 2);
             $temp = GeneralUtility::revExplode('/', $file_extPath, 2);
             if (count($temp) === 1) {
                 array_unshift($temp, '');
             }
             // Add empty first-entry if not there.
-            list($file_extPath, $file_fileName) = $temp;
+            [$file_extPath, $file_fileName] = $temp;
             // The filename is prefixed with "[language key]." because it prevents the llxmltranslate tool from detecting it.
             return Environment::getLabelsPath() . '/' . $language . '/' . $extensionKey . '/' . ($file_extPath ? $file_extPath . '/' : '') . $language . '.' . $file_fileName;
         }
index 48f6711..5b277ef 100644 (file)
@@ -140,9 +140,7 @@ class LogManager implements SingletonInterface, LogManagerInterface
                     /** @var \TYPO3\CMS\Core\Log\Writer\WriterInterface $logWriter */
                     $logWriter = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance($logWriterClassName, $logWriterOptions);
                     $logger->addWriter($severityLevel, $logWriter);
-                } catch (\Psr\Log\InvalidArgumentException $e) {
-                    $logger->warning('Instantiation of LogWriter "' . $logWriterClassName . '" failed for logger ' . $logger->getName() . ' (' . $e->getMessage() . ')');
-                } catch (\TYPO3\CMS\Core\Log\Exception\InvalidLogWriterConfigurationException $e) {
+                } catch (\Psr\Log\InvalidArgumentException|\TYPO3\CMS\Core\Log\Exception\InvalidLogWriterConfigurationException $e) {
                     $logger->warning('Instantiation of LogWriter "' . $logWriterClassName . '" failed for logger ' . $logger->getName() . ' (' . $e->getMessage() . ')');
                 }
             }
@@ -163,9 +161,7 @@ class LogManager implements SingletonInterface, LogManagerInterface
                     /** @var \TYPO3\CMS\Core\Log\Processor\ProcessorInterface $logProcessor */
                     $logProcessor = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance($logProcessorClassName, $logProcessorOptions);
                     $logger->addProcessor($severityLevel, $logProcessor);
-                } catch (\Psr\Log\InvalidArgumentException $e) {
-                    $logger->warning('Instantiation of LogProcessor "' . $logProcessorClassName . '" failed for logger ' . $logger->getName() . ' (' . $e->getMessage() . ')');
-                } catch (\TYPO3\CMS\Core\Log\Exception\InvalidLogProcessorConfigurationException $e) {
+                } catch (\Psr\Log\InvalidArgumentException|\TYPO3\CMS\Core\Log\Exception\InvalidLogProcessorConfigurationException $e) {
                     $logger->warning('Instantiation of LogProcessor "' . $logProcessorClassName . '" failed for logger ' . $logger->getName() . ' (' . $e->getMessage() . ')');
                 }
             }
index 8dd2d45..89137d6 100644 (file)
@@ -369,15 +369,7 @@ class PackageManager implements SingletonInterface
             try {
                 $packagePath = PathUtility::sanitizeTrailingSeparator($this->packagesBasePath . $stateConfiguration['packagePath']);
                 $package = new Package($this, $packageKey, $packagePath);
-            } catch (Exception\InvalidPackagePathException $exception) {
-                $this->unregisterPackageByPackageKey($packageKey);
-                $packageStatesHasChanged = true;
-                continue;
-            } catch (Exception\InvalidPackageKeyException $exception) {
-                $this->unregisterPackageByPackageKey($packageKey);
-                $packageStatesHasChanged = true;
-                continue;
-            } catch (Exception\InvalidPackageManifestException $exception) {
+            } catch (Exception\InvalidPackagePathException|Exception\InvalidPackageKeyException|Exception\InvalidPackageManifestException $exception) {
                 $this->unregisterPackageByPackageKey($packageKey);
                 $packageStatesHasChanged = true;
                 continue;
index c34c80b..ec3631d 100644 (file)
@@ -1653,7 +1653,7 @@ class PageRenderer implements SingletonInterface
     public function render($part = self::PART_COMPLETE)
     {
         $this->prepareRendering();
-        list($jsLibs, $jsFiles, $jsFooterFiles, $cssLibs, $cssFiles, $jsInline, $cssInline, $jsFooterInline, $jsFooterLibs) = $this->renderJavaScriptAndCss();
+        [$jsLibs, $jsFiles, $jsFooterFiles, $cssLibs, $cssFiles, $jsInline, $cssInline, $jsFooterInline, $jsFooterLibs] = $this->renderJavaScriptAndCss();
         $metaTags = implode(LF, array_merge($this->metaTags, $this->renderMetaTagsFromAPI()));
         $markerArray = $this->getPreparedMarkerArray($jsLibs, $jsFiles, $jsFooterFiles, $cssLibs, $cssFiles, $jsInline, $cssInline, $jsFooterInline, $jsFooterLibs, $metaTags);
         $template = $this->getTemplateForPart($part);
@@ -1713,7 +1713,7 @@ class PageRenderer implements SingletonInterface
     public function renderJavaScriptAndCssForProcessingOfUncachedContentObjects($cachedPageContent, $substituteHash)
     {
         $this->prepareRendering();
-        list($jsLibs, $jsFiles, $jsFooterFiles, $cssLibs, $cssFiles, $jsInline, $cssInline, $jsFooterInline, $jsFooterLibs) = $this->renderJavaScriptAndCss();
+        [$jsLibs, $jsFiles, $jsFooterFiles, $cssLibs, $cssFiles, $jsInline, $cssInline, $jsFooterInline, $jsFooterLibs] = $this->renderJavaScriptAndCss();
         $title = $this->title ? str_replace('|', htmlspecialchars($this->title), $this->titleTag) : '';
         $markerArray = [
             '<!-- ###TITLE' . $substituteHash . '### -->' => $title,
@@ -1775,9 +1775,9 @@ class PageRenderer implements SingletonInterface
         $cssLibs = $this->renderCssLibraries();
         $cssFiles = $this->renderCssFiles();
         $cssInline = $this->renderCssInline();
-        list($jsLibs, $jsFooterLibs) = $this->renderAdditionalJavaScriptLibraries();
-        list($jsFiles, $jsFooterFiles) = $this->renderJavaScriptFiles();
-        list($jsInline, $jsFooterInline) = $this->renderInlineJavaScript();
+        [$jsLibs, $jsFooterLibs] = $this->renderAdditionalJavaScriptLibraries();
+        [$jsFiles, $jsFooterFiles] = $this->renderJavaScriptFiles();
+        [$jsInline, $jsFooterInline] = $this->renderInlineJavaScript();
         $jsLibs = $mainJsLibs . $jsLibs;
         if ($this->moveJsFromHeaderToFooter) {
             $jsFooterLibs = $jsLibs . LF . $jsFooterLibs;
index 672a558..325255f 100644 (file)
@@ -293,7 +293,7 @@ abstract class AbstractFile implements FileInterface
         // we don't need to make an SQL statement like EXT:media does currently
         if (!$this->properties['type']) {
             $mimeType = $this->getMimeType();
-            list($fileType) = explode('/', $mimeType);
+            [$fileType] = explode('/', $mimeType);
             switch (strtolower($fileType)) {
                 case 'text':
                     $this->properties['type'] = self::FILETYPE_TEXT;
index 635fb00..a72cc94 100644 (file)
@@ -223,7 +223,7 @@ class Folder implements FolderInterface
             $useFilters = false;
             $backedUpFilters = [];
         } else {
-            list($backedUpFilters, $useFilters) = $this->prepareFiltersInStorage($filterMode);
+            [$backedUpFilters, $useFilters] = $this->prepareFiltersInStorage($filterMode);
         }
 
         $fileObjects = $this->storage->getFilesInFolder($this, $start, $numberOfItems, $useFilters, $recursive, $sort, $sortRev);
@@ -243,7 +243,7 @@ class Folder implements FolderInterface
      */
     public function searchFiles(FileSearchDemand $searchDemand, int $filterMode = self::FILTER_MODE_USE_OWN_AND_STORAGE_FILTERS): FileSearchResultInterface
     {
-        list($backedUpFilters, $useFilters) = $this->prepareFiltersInStorage($filterMode);
+        [$backedUpFilters, $useFilters] = $this->prepareFiltersInStorage($filterMode);
         $searchResult = $this->storage->searchFiles($searchDemand, $this, $useFilters);
         $this->restoreBackedUpFiltersInStorage($backedUpFilters);
 
@@ -290,7 +290,7 @@ class Folder implements FolderInterface
      */
     public function getSubfolders($start = 0, $numberOfItems = 0, $filterMode = self::FILTER_MODE_USE_OWN_AND_STORAGE_FILTERS, $recursive = false)
     {
-        list($backedUpFilters, $useFilters) = $this->prepareFiltersInStorage($filterMode);
+        [$backedUpFilters, $useFilters] = $this->prepareFiltersInStorage($filterMode);
         $folderObjects = $this->storage->getFoldersInFolder($this, $start, $numberOfItems, $useFilters, $recursive);
         $this->restoreBackedUpFiltersInStorage($backedUpFilters);
         return $folderObjects;
index 71d3a10..93f182c 100644 (file)
@@ -95,7 +95,7 @@ class FileIndexRepository implements SingletonInterface
      */
     public function findOneByCombinedIdentifier($combinedIdentifier)
     {
-        list($storageUid, $identifier) = GeneralUtility::trimExplode(':', $combinedIdentifier, false, 2);
+        [$storageUid, $identifier] = GeneralUtility::trimExplode(':', $combinedIdentifier, false, 2);
         return $this->findOneByStorageUidAndIdentifier($storageUid, $identifier);
     }
 
index 6581168..4e69422 100644 (file)
@@ -329,7 +329,7 @@ class Indexer implements LoggerAwareInterface
      */
     protected function getFileType($mimeType)
     {
-        list($fileType) = explode('/', $mimeType);
+        [$fileType] = explode('/', $mimeType);
         switch (strtolower($fileType)) {
             case 'text':
                 $type = File::FILETYPE_TEXT;
index 63c35a1..e87fed3 100644 (file)
@@ -73,7 +73,7 @@ class LocalCropScaleMaskHelper
                 $crop = $configuration['crop'];
             }
 
-            list($offsetLeft, $offsetTop, $newWidth, $newHeight) = explode(',', $crop, 4);
+            [$offsetLeft, $offsetTop, $newWidth, $newHeight] = explode(',', $crop, 4);
 
             $backupPrefix = $gifBuilder->filenamePrefix;
             $gifBuilder->filenamePrefix = 'crop_';
index b823751..6f24d7a 100644 (file)
@@ -459,7 +459,7 @@ class ResourceFactory implements ResourceFactoryInterface, \TYPO3\CMS\Core\Singl
             return $this->getFileObject($input);
         }
         if (strpos($input, ':') > 0) {
-            list($prefix) = explode(':', $input);
+            [$prefix] = explode(':', $input);
             if (MathUtility::canBeInterpretedAsInteger($prefix)) {
                 // path or folder in a valid storageUID
                 return $this->getObjectFromCombinedIdentifier($input);
@@ -538,7 +538,7 @@ class ResourceFactory implements ResourceFactoryInterface, \TYPO3\CMS\Core\Singl
      */
     public function getObjectFromCombinedIdentifier($identifier)
     {
-        list($storageId, $objectIdentifier) = GeneralUtility::trimExplode(':', $identifier);
+        [$storageId, $objectIdentifier] = GeneralUtility::trimExplode(':', $identifier);
         $storage = $this->getStorageObject($storageId);
         if ($storage->hasFile($objectIdentifier)) {
             return $storage->getFile($objectIdentifier);
index 3c766c2..a6fadb3 100644 (file)
@@ -1663,7 +1663,7 @@ class ResourceStorage implements ResourceStorageInterface
             foreach ($allStorages as $storage) {
                 // To circumvent the permission check of the folder, we use the factory to create it "manually" instead of directly using $storage->getProcessingFolder()
                 // See #66695 for details
-                list($storageUid, $processingFolderIdentifier) = array_pad(GeneralUtility::trimExplode(':', $storage->getStorageRecord()['processingfolder']), 2, null);
+                [$storageUid, $processingFolderIdentifier] = array_pad(GeneralUtility::trimExplode(':', $storage->getStorageRecord()['processingfolder']), 2, null);
                 if (empty($processingFolderIdentifier) || (int)$storageUid !== $this->getUid()) {
                     continue;
                 }
@@ -2724,7 +2724,7 @@ class ResourceStorage implements ResourceStorageInterface
             }
             try {
                 if (strpos($processingFolder, ':') !== false) {
-                    list($storageUid, $processingFolderIdentifier) = explode(':', $processingFolder, 2);
+                    [$storageUid, $processingFolderIdentifier] = explode(':', $processingFolder, 2);
                     $storage = $this->getResourceFactoryInstance()->getStorageObject($storageUid);
                     if ($storage->hasFolder($processingFolderIdentifier)) {
                         $this->processingFolder = $storage->getFolder($processingFolderIdentifier);
@@ -2762,14 +2762,7 @@ class ResourceStorage implements ResourceStorageInterface
                         $this->processingFolder = $this->getResourceFactoryInstance()->createFolderObject($this, $data['identifier'], $data['name']);
                     }
                 }
-            } catch (Exception\InsufficientFolderWritePermissionsException $e) {
-                $this->processingFolder = GeneralUtility::makeInstance(
-                    InaccessibleFolder::class,
-                    $this,
-                    $processingFolder,
-                    $processingFolder
-                );
-            } catch (Exception\ResourcePermissionsUnavailableException $e) {
+            } catch (Exception\InsufficientFolderWritePermissionsException|Exception\ResourcePermissionsUnavailableException $e) {
                 $this->processingFolder = GeneralUtility::makeInstance(
                     InaccessibleFolder::class,
                     $this,
index df5b4bb..d416d24 100644 (file)
@@ -987,7 +987,7 @@ class ExtendedTemplateService extends TemplateService
                     $p_field = '';
                     $raname = substr(md5($params['name']), 0, 10);
                     $aname = '\'' . $raname . '\'';
-                    list($fN, $fV, $params, $idName) = $this->ext_fNandV($params);
+                    [$fN, $fV, $params, $idName] = $this->ext_fNandV($params);
                     $idName = htmlspecialchars($idName);
                     $hint = '';
                     switch ($typeDat['type']) {
@@ -1327,7 +1327,7 @@ class ExtendedTemplateService extends TemplateService
                     // If checkbox is set, update the value
                     if ($this->ext_dontCheckIssetValues || isset($check[$key])) {
                         // Exploding with linebreak, just to make sure that no multiline input is given!
-                        list($var) = explode(LF, $var);
+                        [$var] = explode(LF, $var);
                         $typeDat = $this->ext_getTypeData($theConstants[$key]['type']);
                         switch ($typeDat['type']) {
                             case 'int':
index 1bc4f72..70afa72 100644 (file)
@@ -628,7 +628,7 @@ class TypoScriptParser
             return '';
         }
 
-        list($key, $remainingKey) = $this->parseNextKeySegment($string);
+        [$key, $remainingKey] = $this->parseNextKeySegment($string);
         $key .= '.';
         if (!isset($setup[$key])) {
             $setup[$key] = [];
@@ -653,7 +653,7 @@ class TypoScriptParser
             return [];
         }
 
-        list($key, $remainingKey) = $this->parseNextKeySegment($string);
+        [$key, $remainingKey] = $this->parseNextKeySegment($string);
         $subKey = $key . '.';
         if ($remainingKey === '') {
             $retArr = [];
@@ -686,7 +686,7 @@ class TypoScriptParser
             return;
         }
 
-        list($key, $remainingKey) = $this->parseNextKeySegment($string);
+        [$key, $remainingKey] = $this->parseNextKeySegment($string);
         $subKey = $key . '.';
         if ($remainingKey === '') {
             if ($value === 'UNSET') {
@@ -773,7 +773,7 @@ class TypoScriptParser
             $keySegment = str_replace('\\.', '.', $keySegment);
         } else {
             // no backslash in the key, we're fine off
-            list($keySegment, $remainingKey) = explode('.', $key, 2);
+            [$keySegment, $remainingKey] = explode('.', $key, 2);
         }
         return [$keySegment, $remainingKey];
     }
@@ -907,7 +907,7 @@ class TypoScriptParser
                     $filePointerPathParts = explode('/', substr($filename, 4));
 
                     // remove file part, determine whether to load setup or constants
-                    list($includeType, ) = explode('.', array_pop($filePointerPathParts));
+                    [$includeType, ] = explode('.', array_pop($filePointerPathParts));
 
                     if (in_array($includeType, ['setup', 'constants'])) {
                         // adapt extension key to required format (no underscores)
@@ -1050,7 +1050,7 @@ class TypoScriptParser
             if (strpos(strtoupper($filename), 'EXT:') === 0) {
                 $filePointerPathParts = explode('/', substr($filename, 4));
                 // remove file part, determine whether to load setup or constants
-                list($includeType) = explode('.', array_pop($filePointerPathParts));
+                [$includeType] = explode('.', array_pop($filePointerPathParts));
 
                 if (in_array($includeType, ['setup', 'constants'], true)) {
                     // adapt extension key to required format (no underscores)
index 9ebb51d..311efe1 100644 (file)
@@ -788,7 +788,7 @@ class TemplateService
             // Traversing list
             foreach ($include_static_fileArr as $ISF_file) {
                 if (strpos($ISF_file, 'EXT:') === 0) {
-                    list($ISF_extKey, $ISF_localPath) = explode('/', substr($ISF_file, 4), 2);
+                    [$ISF_extKey, $ISF_localPath] = explode('/', substr($ISF_file, 4), 2);
                     if ((string)$ISF_extKey !== '' && ExtensionManagementUtility::isLoaded($ISF_extKey) && (string)$ISF_localPath !== '') {
                         $ISF_localPath = rtrim($ISF_localPath, '/') . '/';
                         $ISF_filePath = ExtensionManagementUtility::extPath($ISF_extKey) . $ISF_localPath;
index 205b7ed..fb13a20 100644 (file)
@@ -368,7 +368,7 @@ class CommandUtility
                 if (trim($val) === '') {
                     continue;
                 }
-                list($cmd, $cmdPath) = GeneralUtility::trimExplode('=', $val, true, 2);
+                [$cmd, $cmdPath] = GeneralUtility::trimExplode('=', $val, true, 2);
                 $cmdArr[$cmd]['app'] = PathUtility::basename($cmdPath);
                 $cmdArr[$cmd]['path'] = PathUtility::dirname($cmdPath) . '/';
                 $cmdArr[$cmd]['valid'] = true;
index ea622a6..389bc90 100644 (file)
@@ -213,7 +213,7 @@ class ExtensionManagementUtility
             return;
         }
         if ($position !== '') {
-            list($positionIdentifier, $entityName) = GeneralUtility::trimExplode(':', $position);
+            [$positionIdentifier, $entityName] = GeneralUtility::trimExplode(':', $position);
         } else {
             $positionIdentifier = '';
             $entityName = '';
@@ -578,7 +578,7 @@ class ExtensionManagementUtility
         $list = $newList = trim($list, ", \t\n\r\0\x0B");
 
         if ($insertionPosition !== '') {
-            list($location, $positionName) = GeneralUtility::trimExplode(':', $insertionPosition, false, 2);
+            [$location, $positionName] = GeneralUtility::trimExplode(':', $insertionPosition, false, 2);
         } else {
             $location = '';
             $positionName = '';
@@ -763,7 +763,7 @@ class ExtensionManagementUtility
         // If there is already a main module by this name:
         // Adding the submodule to the correct position:
         if (isset($GLOBALS['TBE_MODULES'][$main]) && $sub) {
-            list($place, $modRef) = array_pad(GeneralUtility::trimExplode(':', $position, true), 2, null);
+            [$place, $modRef] = array_pad(GeneralUtility::trimExplode(':', $position, true), 2, null);
             $modules = ',' . $GLOBALS['TBE_MODULES'][$main] . ',';
             if ($place === null || ($modRef !== null && !GeneralUtility::inList($modules, $modRef))) {
                 $place = 'bottom';
index 616f382..f6af68e 100644 (file)
@@ -1018,11 +1018,7 @@ class ExtendedFileUtility extends BasicFileUtility
             $this->writeLog(SystemLogFileAction::EDIT, SystemLogErrorClassification::USER_ERROR, 100, 'File "%s" was not saved! Write-permission problem?', [$fileObject->getIdentifier()]);
             $this->addMessageToFlashMessageQueue('FileUtility.FileWasNotSaved', [$fileObject->getIdentifier()]);
             return false;
-        } catch (IllegalFileExtensionException $e) {
-            $this->writeLog(SystemLogFileAction::EDIT, SystemLogErrorClassification::USER_ERROR, 100, 'File "%s" was not saved! File extension rejected!', [$fileObject->getIdentifier()]);
-            $this->addMessageToFlashMessageQueue('FileUtility.FileWasNotSaved', [$fileObject->getIdentifier()]);
-            return false;
-        } catch (\RuntimeException $e) {
+        } catch (IllegalFileExtensionException|\RuntimeException $e) {
             $this->writeLog(SystemLogFileAction::EDIT, SystemLogErrorClassification::USER_ERROR, 100, 'File "%s" was not saved! File extension rejected!', [$fileObject->getIdentifier()]);
             $this->addMessageToFlashMessageQueue('FileUtility.FileWasNotSaved', [$fileObject->getIdentifier()]);
             return false;
index 39d5d23..324d95b 100644 (file)
@@ -263,7 +263,7 @@ class GeneralUtility
             foreach ($values as $test) {
                 $testList = explode('/', $test);
                 if (count($testList) === 2) {
-                    list($test, $mask) = $testList;
+                    [$test, $mask] = $testList;
                 } else {
                     $mask = false;
                 }
@@ -311,7 +311,7 @@ class GeneralUtility
         foreach ($values as $test) {
             $testList = explode('/', $test);
             if (count($testList) === 2) {
-                list($test, $mask) = $testList;
+                [$test, $mask] = $testList;
             } else {
                 $mask = false;
             }
@@ -1151,7 +1151,7 @@ class GeneralUtility
         $p = explode('&', $string);
         foreach ($p as $v) {
             if ($v !== '') {
-                list($pK, $pV) = explode('=', $v, 2);
+                [$pK, $pV] = explode('=', $v, 2);
                 $output[rawurldecode($pK)] = rawurldecode($pV);
             }
         }
@@ -2684,7 +2684,7 @@ class GeneralUtility
                 // Typical application of REQUEST_URI is return urls, forms submitting to itself etc. Example: returnUrl='.rawurlencode(\TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('REQUEST_URI'))
                 if (!empty($GLOBALS['TYPO3_CONF_VARS']['SYS']['requestURIvar'])) {
                     // This is for URL rewriters that store the original URI in a server variable (eg ISAPI_Rewriter for IIS: HTTP_X_REWRITE_URL)
-                    list($v, $n) = explode('|', $GLOBALS['TYPO3_CONF_VARS']['SYS']['requestURIvar']);
+                    [$v, $n] = explode('|', $GLOBALS['TYPO3_CONF_VARS']['SYS']['requestURIvar']);
                     $retVal = $GLOBALS[$v][$n];
                 } elseif (empty($_SERVER['REQUEST_URI'])) {
                     // This is for ISS/CGI which does not have the REQUEST_URI available.
@@ -3009,7 +3009,7 @@ class GeneralUtility
         }
         // Extension
         if (strpos($filename, 'EXT:') === 0) {
-            list($extKey, $local) = explode('/', substr($filename, 4), 2);
+            [$extKey, $local] = explode('/', substr($filename, 4), 2);
             $filename = '';
             if ((string)$extKey !== '' && ExtensionManagementUtility::isLoaded($extKey) && (string)$local !== '') {
                 $filename = ExtensionManagementUtility::extPath($extKey) . $local;
index 8f783ad..a03af3c 100644 (file)
@@ -311,7 +311,7 @@ class PathUtility
         // @todo do we really need this? Probably only in testing context for vfs?
         $protocol = '';
         if (strpos($path, '://') !== false) {
-            list($protocol, $path) = explode('://', $path);
+            [$protocol, $path] = explode('://', $path);
             $protocol .= '://';
         }
 
index d332f03..895c23f 100644 (file)
@@ -47,8 +47,8 @@ class ResourceUtility
                 $result = -1;
             } else {
                 // both elements are directories => we have to recursively sort here
-                list($pathPartA, $elementA) = explode('/', $elementA, 2);
-                list($pathPartB, $elementB) = explode('/', $elementB, 2);
+                [$pathPartA, $elementA] = explode('/', $elementA, 2);
+                [$pathPartB, $elementB] = explode('/', $elementB, 2);
 
                 if ($pathPartA === $pathPartB) {
                     // same directory => sort by subpaths
index 3459edc..e446c26 100644 (file)
@@ -471,7 +471,7 @@ class RootlineUtility
     {
         $mountPoints = GeneralUtility::trimExplode(',', $this->mountPointParameter);
         foreach ($mountPoints as $mP) {
-            list($mountedPageUid, $mountPageUid) = GeneralUtility::intExplode('-', $mP);
+            [$mountedPageUid, $mountPageUid] = GeneralUtility::intExplode('-', $mP);
             $this->parsedMountPointParameters[$mountedPageUid] = $mountPageUid;
         }
     }
index 73e1da8..d9d849c 100644 (file)
@@ -242,7 +242,7 @@ class FrontendConfigurationManager extends \TYPO3\CMS\Extbase\Configuration\Abst
         $switchableControllerActionPartsFromFlexForm = GeneralUtility::trimExplode(',', str_replace(';', ',', $flexFormConfiguration['switchableControllerActions']), true);
         $overriddenControllerConfiguration = [];
         foreach ($switchableControllerActionPartsFromFlexForm as $switchableControllerActionPartFromFlexForm) {
-            list($controller, $action) = GeneralUtility::trimExplode('->', $switchableControllerActionPartFromFlexForm);
+            [$controller, $action] = GeneralUtility::trimExplode('->', $switchableControllerActionPartFromFlexForm);
             if (empty($controller) || empty($action)) {
                 throw new \TYPO3\CMS\Extbase\Configuration\Exception\ParseErrorException('Controller or action were empty when overriding switchableControllerActions from flexForm.', 1257146403);
             }
index f68314a..03b42c2 100644 (file)
@@ -188,7 +188,7 @@ class ExtbasePluginEnhancer extends PluginEnhancer
             return false;
         }
         $controller = $route->getDefault('_controller');
-        list($controllerName, $actionName) = explode('::', $controller);
+        [$controllerName, $actionName] = explode('::', $controller);
         if ($controllerName !== $parameters[$this->namespace]['controller']) {
             return false;
         }
@@ -220,7 +220,7 @@ class ExtbasePluginEnhancer extends PluginEnhancer
         if (strpos($controllerActionValue, '::') === false) {
             return;
         }
-        list($controllerName, $actionName) = explode('::', $controllerActionValue, 2);
+        [$controllerName, $actionName] = explode('::', $controllerActionValue, 2);
         // use default action name if controller matches
         if ($tryUpdate && empty($target['action']) && $controllerName === ($target['controller'] ?? null)) {
             $target['action'] = $actionName;
index e4ef324..2bbeb44 100644 (file)
@@ -150,7 +150,7 @@ class TypeHandlingUtility
      */
     public static function isValidTypeForMultiValueComparison($value): bool
     {
-        return is_array($value) || $value instanceof \Traversable;
+        return is_iterable($value);
     }
 
     /**
index 56fed8d..c799ad0 100644 (file)
@@ -102,9 +102,7 @@ class ActionController extends AbstractController
                     $this->redirect('unresolvedDependencies', 'List', null, ['extensionKey' => $extensionKey]);
                 }
             }
-        } catch (\TYPO3\CMS\Extensionmanager\Exception\ExtensionManagerException $e) {
-            $this->addFlashMessage($e->getMessage(), '', \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR);
-        } catch (\TYPO3\CMS\Core\Package\Exception\PackageStatesFileNotWritableException $e) {
+        } catch (\TYPO3\CMS\Extensionmanager\Exception\ExtensionManagerException|\TYPO3\CMS\Core\Package\Exception\PackageStatesFileNotWritableException $e) {
             $this->addFlashMessage($e->getMessage(), '', \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR);
         }
         $this->redirect('index', 'List', null, [
@@ -143,9 +141,7 @@ class ActionController extends AbstractController
                     ]
                 )
             );
-        } catch (\TYPO3\CMS\Extensionmanager\Exception\ExtensionManagerException $e) {
-            $this->addFlashMessage($e->getMessage(), '', \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR);
-        } catch (\TYPO3\CMS\Core\Package\Exception $e) {
+        } catch (\TYPO3\CMS\Extensionmanager\Exception\ExtensionManagerException|\TYPO3\CMS\Core\Package\Exception $e) {
             $this->addFlashMessage($e->getMessage(), '', \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR);
         }
 
index 0311a78..449791f 100644 (file)
@@ -175,7 +175,7 @@ class DownloadController extends AbstractController
      */
     public function installFromTerAction(Extension $extension, $downloadPath = 'Local')
     {
-        list($result, $errorMessages) = $this->installFromTer($extension, $downloadPath);
+        [$result, $errorMessages] = $this->installFromTer($extension, $downloadPath);
         $isAutomaticInstallationEnabled = (bool)GeneralUtility::makeInstance(ExtensionConfiguration::class)->get('extensionmanager', 'automaticInstallation');
         $this->view
             ->assign('result', $result)
@@ -207,7 +207,7 @@ class DownloadController extends AbstractController
         if (!\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('impexp')) {
             $this->forward('distributions', 'List');
         }
-        list($result, $errorMessages) = $this->installFromTer($extension);
+        [$result, $errorMessages] = $this->installFromTer($extension);
         if ($errorMessages) {
             foreach ($errorMessages as $extensionKey => $messages) {
                 foreach ($messages as $message) {
index db30705..6da8703 100644 (file)
@@ -624,7 +624,7 @@ class FrontendLoginController extends AbstractPlugin
         }
         $_params = [];
         foreach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['felogin']['loginFormOnSubmitFuncs'] ?? [] as $funcRef) {
-            list($onSub, $hid) = GeneralUtility::callUserFunction($funcRef, $_params, $this);
+            [$onSub, $hid] = GeneralUtility::callUserFunction($funcRef, $_params, $this);
             $onSubmitAr[] = $onSub;
             $extraHiddenAr[] = $hid;
         }
index ce46380..c0918af 100644 (file)
@@ -445,7 +445,7 @@ class FileList
             $iOut = '';
             // Directories are added
             $this->eCounter = $this->firstElementNumber;
-            list(, $code) = $this->fwd_rwd_nav();
+            [, $code] = $this->fwd_rwd_nav();
             $iOut .= $code;
 
             $iOut .= $this->formatDirList($folders);
@@ -455,7 +455,7 @@ class FileList
             $this->eCounter = $this->firstElementNumber + $this->iLimit < $this->totalItems
                 ? $this->firstElementNumber + $this->iLimit
                 : -1;
-            list(, $code) = $this->fwd_rwd_nav();
+            [, $code] = $this->fwd_rwd_nav();
             $iOut .= $code;
 
             // Header line is drawn
index ee6c8f4..30a23db 100644 (file)
@@ -80,7 +80,7 @@ class EmailViewHelper extends AbstractTagBasedViewHelper
         $email = $this->arguments['email'];
 
         if ($this->isFrontendAvailable()) {
-            list($linkHref, $linkText) = $GLOBALS['TSFE']->cObj->getMailTo($email, '');
+            [$linkHref, $linkText] = $GLOBALS['TSFE']->cObj->getMailTo($email, '');
             $escapeSpecialCharacters = !isset($GLOBALS['TSFE']->spamProtectEmailAddresses) || $GLOBALS['TSFE']->spamProtectEmailAddresses !== 'ascii';
         } else {
             $linkHref = 'mailto:' . $email;
index ccb7a68..822f9fe 100644 (file)
@@ -184,10 +184,7 @@ class DataStructureIdentifierHook
                         );
                     }
                 }
-            } catch (NoSuchFileException $e) {
-                $dataStructure = $this->addSelectedPersistenceIdentifier($identifier['ext-form-persistenceIdentifier'], $dataStructure);
-                $this->addInvalidFrameworkConfigurationFlashMessage($e);
-            } catch (ParseErrorException $e) {
+            } catch (NoSuchFileException|ParseErrorException $e) {
                 $dataStructure = $this->addSelectedPersistenceIdentifier($identifier['ext-form-persistenceIdentifier'], $dataStructure);
                 $this->addInvalidFrameworkConfigurationFlashMessage($e);
             }
index 425b6dc..82bcb15 100644 (file)
@@ -227,7 +227,7 @@ class FormPersistenceManager implements FormPersistenceManagerInterface
             $fileToDelete = GeneralUtility::getFileAbsFileName($persistenceIdentifier);
             unlink($fileToDelete);
         } else {
-            list($storageUid, $fileIdentifier) = explode(':', $persistenceIdentifier, 2);
+            [$storageUid, $fileIdentifier] = explode(':', $persistenceIdentifier, 2);
             $storage = $this->getStorageByUid((int)$storageUid);
             $file = $storage->getFile($fileIdentifier);
             if (!$storage->checkFileActionPermission('delete', $file)) {
@@ -253,7 +253,7 @@ class FormPersistenceManager implements FormPersistenceManagerInterface
                     $exists = file_exists(GeneralUtility::getFileAbsFileName($persistenceIdentifier));
                 }
             } else {
-                list($storageUid, $fileIdentifier) = explode(':', $persistenceIdentifier, 2);
+                [$storageUid, $fileIdentifier] = explode(':', $persistenceIdentifier, 2);
                 $storage = $this->getStorageByUid((int)$storageUid);
                 $exists = $storage->hasFile($fileIdentifier);
             }
@@ -605,7 +605,7 @@ class FormPersistenceManager implements FormPersistenceManagerInterface
      */
     protected function getOrCreateFile(string $persistenceIdentifier): File
     {
-        list($storageUid, $fileIdentifier) = explode(':', $persistenceIdentifier, 2);
+        [$storageUid, $fileIdentifier] = explode(':', $persistenceIdentifier, 2);
         $storage = $this->getStorageByUid((int)$storageUid);
         $pathinfo = PathUtility::pathinfo($fileIdentifier);
 
index 787ec4f..755bd76 100644 (file)
@@ -499,7 +499,7 @@ class ContentObjectRenderer implements LoggerAwareInterface
             $this->typoScriptFrontendController = $GLOBALS['TSFE'];
         }
         if ($this->currentFile !== null && is_string($this->currentFile)) {
-            list($objectType, $identifier) = explode(':', $this->currentFile, 2);
+            [$objectType, $identifier] = explode(':', $this->currentFile, 2);
             try {
                 if ($objectType === 'File') {
                     $this->currentFile = ResourceFactory::getInstance()->retrieveFileOrFolderObject($identifier);
@@ -707,7 +707,7 @@ class ContentObjectRenderer implements LoggerAwareInterface
                 $cF = GeneralUtility::makeInstance(TypoScriptParser::class);
                 // $name and $conf is loaded with the referenced values.
                 $confOverride = is_array($conf) ? $conf : [];
-                list($name, $conf) = $cF->getVal($key, $this->getTypoScriptFrontendController()->tmpl->setup);
+                [$name, $conf] = $cF->getVal($key, $this->getTypoScriptFrontendController()->tmpl->setup);
                 $conf = array_replace_recursive(is_array($conf) ? $conf : [], $confOverride);
                 // Getting the cObject
                 $timeTracker->incStackPointer();
@@ -4029,7 +4029,7 @@ class ContentObjectRenderer implements LoggerAwareInterface
             $tagName = '';
             if (isset($l[0]) && $l[0] === '<' && substr($l, -1) === '>') {
                 $fwParts = explode('>', substr($l, 1), 2);
-                list($tagName) = explode(' ', $fwParts[0], 2);
+                [$tagName] = explode(' ', $fwParts[0], 2);
                 if (!$fwParts[1]) {
                     if (substr($tagName, -1) === '/') {
                         $tagName = substr($tagName, 0, -1);
@@ -4212,7 +4212,7 @@ class ContentObjectRenderer implements LoggerAwareInterface
                 $parts[0] = substr($textpieces[$i], 0, $len);
                 $parts[1] = substr($textpieces[$i], $len);
                 $linktxt = preg_replace('/\\?.*/', '', $parts[0]);
-                list($mailToUrl, $linktxt) = $this->getMailTo($parts[0], $linktxt);
+                [$mailToUrl, $linktxt] = $this->getMailTo($parts[0], $linktxt);
                 $mailToUrl = $tsfe->spamProtectEmailAddresses === 'ascii' ? $mailToUrl : htmlspecialchars($mailToUrl);
                 $res = '<a href="' . $mailToUrl . '"' . $aTagParams . '>';
                 $wrap = isset($conf['wrap.']) ? $this->stdWrap($conf['wrap'], $conf['wrap.']) : $conf['wrap'];
@@ -4676,7 +4676,7 @@ class ContentObjectRenderer implements LoggerAwareInterface
                         break;
                     case 'context':
                         $context = GeneralUtility::makeInstance(Context::class);
-                        list($aspectName, $propertyName) = GeneralUtility::trimExplode(':', $key, true, 2);
+                        [$aspectName, $propertyName] = GeneralUtility::trimExplode(':', $key, true, 2);
                         $retVal = $context->getPropertyFromAspect($aspectName, $propertyName, '');
                         if (is_array($retVal)) {
                             $retVal = implode(',', $retVal);
@@ -4731,7 +4731,7 @@ class ContentObjectRenderer implements LoggerAwareInterface
      */
     protected function getFileDataKey($key)
     {
-        list($fileUidOrCurrentKeyword, $requestedFileInformationKey) = explode(':', $key, 3);
+        [$fileUidOrCurrentKeyword, $requestedFileInformationKey] = explode(':', $key, 3);
         try {
             if ($fileUidOrCurrentKeyword === 'current') {
                 $fileObject = $this->getCurrentFile();
@@ -5005,7 +5005,7 @@ class ContentObjectRenderer implements LoggerAwareInterface
                 $tsfe
             );
             try {
-                list($this->lastTypoLinkUrl, $linkText, $target) = $linkBuilder->build($linkDetails, $linkText, $target, $conf);
+                [$this->lastTypoLinkUrl, $linkText, $target] = $linkBuilder->build($linkDetails, $linkText, $target, $conf);
                 $this->lastTypoLinkTarget = htmlspecialchars($target);
                 $this->lastTypoLinkLD['target'] = htmlspecialchars($target);
                 $this->lastTypoLinkLD['totalUrl'] = $this->lastTypoLinkUrl;
@@ -5060,7 +5060,7 @@ class ContentObjectRenderer implements LoggerAwareInterface
             $JSwindow_tempParamsArr = GeneralUtility::trimExplode(',', strtolower($conf['JSwindow_params'] . ',' . $JSwindowParts[4]), true);
             $JSwindow_paramsArr = [];
             foreach ($JSwindow_tempParamsArr as $JSv) {
-                list($JSp, $JSv) = explode('=', $JSv, 2);
+                [$JSp, $JSv] = explode('=', $JSv, 2);
                 $JSwindow_paramsArr[$JSp] = $JSp . '=' . $JSv;
             }
             // Add width/height:
@@ -5798,7 +5798,7 @@ class ContentObjectRenderer implements LoggerAwareInterface
             $cF = GeneralUtility::makeInstance(TypoScriptParser::class);
             // $name and $conf is loaded with the referenced values.
             $old_conf = $confArr[$prop . '.'];
-            list(, $conf) = $cF->getVal($key, $this->getTypoScriptFrontendController()->tmpl->setup);
+            [, $conf] = $cF->getVal($key, $this->getTypoScriptFrontendController()->tmpl->setup);
             if (is_array($old_conf) && !empty($old_conf)) {
                 $conf = is_array($conf) ? array_replace_recursive($conf, $old_conf) : $old_conf;
             }
@@ -6892,7 +6892,7 @@ class ContentObjectRenderer implements LoggerAwareInterface
         } else {
             $checkEditAccessInternals = true;
         }
-        list($table, $uid) = explode(':', $currentRecord);
+        [$table, $uid] = explode(':', $currentRecord);
         // Page ID for new records, 0 if not specified
         $newRecordPid = (int)$conf['newRecordInPid'];
         $newUid = null;
@@ -6948,8 +6948,8 @@ class ContentObjectRenderer implements LoggerAwareInterface
             $dataArray = $this->data;
         }
         // Check incoming params:
-        list($currentRecordTable, $currentRecordUID) = explode(':', $currentRecord);
-        list($fieldList, $table) = array_reverse(GeneralUtility::trimExplode(':', $params, true));
+        [$currentRecordTable, $currentRecordUID] = explode(':', $currentRecord);
+        [$fieldList, $table] = array_reverse(GeneralUtility::trimExplode(':', $params, true));
         // Reverse the array because table is optional
         if (!$table) {
             $table = $currentRecordTable;
index b2184c8..4ee809a 100644 (file)
@@ -867,7 +867,7 @@ abstract class AbstractMenuContentObject
     {
         $tsfe = $this->getTypoScriptFrontendController();
         $menuItems = [];
-        list($specialValue) = GeneralUtility::intExplode(',', $specialValue);
+        [$specialValue] = GeneralUtility::intExplode(',', $specialValue);
         if (!$specialValue) {
             $specialValue = $tsfe->page['uid'];
         }
@@ -918,7 +918,7 @@ abstract class AbstractMenuContentObject
         // Which field is for keywords
         $kfield = 'keywords';
         if ($this->conf['special.']['keywordsField']) {
-            list($kfield) = explode(' ', trim($this->conf['special.']['keywordsField']));
+            [$kfield] = explode(' ', trim($this->conf['special.']['keywordsField']));
         }
         // If there are keywords and the startuid is present
         if ($kw && $startUid) {
@@ -1057,7 +1057,7 @@ abstract class AbstractMenuContentObject
     protected function prepareMenuItemsForBrowseMenu($specialValue, $sortingField, $additionalWhere)
     {
         $menuItems = [];
-        list($specialValue) = GeneralUtility::intExplode(',', $specialValue);
+        [$specialValue] = GeneralUtility::intExplode(',', $specialValue);
         if (!$specialValue) {
             $specialValue = $this->getTypoScriptFrontendController()->page['uid'];
         }
index b465714..48bc519 100644 (file)
@@ -49,7 +49,7 @@ class ScalableVectorGraphicsContentObject extends AbstractContentObject
     protected function renderInline(array $conf): string
     {
         $src = $this->resolveAbsoluteSourcePath($conf);
-        list($width, $height, $isDefaultWidth, $isDefaultHeight) = $this->getDimensions($conf);
+        [$width, $height, $isDefaultWidth, $isDefaultHeight] = $this->getDimensions($conf);
 
         $content = '';
         if (file_exists($src)) {
@@ -94,7 +94,7 @@ class ScalableVectorGraphicsContentObject extends AbstractContentObject
     protected function renderObject(array $conf): string
     {
         $src = $this->resolveAbsoluteSourcePath($conf);
-        list($width, $height) = $this->getDimensions($conf);
+        [$width, $height] = $this->getDimensions($conf);
 
         $src = $src === '' ? null : PathUtility::getAbsoluteWebPath($src);
 
index a149e5a..d8b6678 100644 (file)
@@ -55,7 +55,7 @@ class TemplateContentObject extends AbstractContentObject
         if (!$markerWrap) {
             $markerWrap = '### | ###';
         }
-        list($PRE, $POST) = explode('|', $markerWrap);
+        [$PRE, $POST] = explode('|', $markerWrap);
         $POST = trim($POST);
         $PRE = trim($PRE);
         // Getting the content
index 13e3fe4..b4197e1 100644 (file)
@@ -3196,7 +3196,7 @@ class TypoScriptFrontendController implements LoggerAwareInterface
         // Set additional headers if any have been configured via TypoScript
         $additionalHeaders = $this->getAdditionalHeaders();
         foreach ($additionalHeaders as $headerConfig) {
-            list($header, $value) = GeneralUtility::trimExplode(':', $headerConfig['header'], false, 2);
+            [$header, $value] = GeneralUtility::trimExplode(':', $headerConfig['header'], false, 2);
             if ($headerConfig['statusCode']) {
                 $response = $response->withStatus((int)$headerConfig['statusCode']);
             }
@@ -3695,7 +3695,7 @@ class TypoScriptFrontendController implements LoggerAwareInterface
     {
         $now = (int)$now;
         $result = PHP_INT_MAX;
-        list($tableName, $pid) = GeneralUtility::trimExplode(':', $tableDef);
+        [$tableName, $pid] = GeneralUtility::trimExplode(':', $tableDef);
         if (empty($tableName) || empty($pid)) {
             throw new \InvalidArgumentException('Unexpected value for parameter $tableDef. Expected <tablename>:<pid>, got \'' . htmlspecialchars($tableDef) . '\'.', 1307190365);
         }
index 86234b9..49a6dae 100644 (file)
@@ -97,7 +97,7 @@ class FrontendUserAuthenticator implements MiddlewareInterface
         ServerRequestInterface $request,
         string $frontendSessionKey
     ): ServerRequestInterface {
-        list($sessionId, $hash) = explode('-', $frontendSessionKey);
+        [$sessionId, $hash] = explode('-', $frontendSessionKey);
         // If the session key hash check is OK, set the cookie
         if (md5($sessionId . '/' . $GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey']) === (string)$hash) {
             $cookieName = FrontendUserAuthentication::getCookieName();
index 7d9232d..a7fc22c 100644 (file)
@@ -1081,9 +1081,9 @@ class AbstractPlugin
             $queryBuilder->getRestrictions()->removeAll();
 
             // Split the "FROM ... WHERE" string so we get the WHERE part and TABLE names separated...:
-            list($tableListFragment, $whereFragment) = preg_split('/WHERE/i', trim($query), 2);
+            [$tableListFragment, $whereFragment] = preg_split('/WHERE/i', trim($query), 2);
             foreach (QueryHelper::parseTableList($tableListFragment) as $tableNameAndAlias) {
-                list($tableName, $tableAlias) = $tableNameAndAlias;
+                [$tableName, $tableAlias] = $tableNameAndAlias;
                 $queryBuilder->from($tableName, $tableAlias);
             }
             $queryBuilder->where(QueryHelper::stripLogicalOperatorPrefix($whereFragment));
@@ -1118,7 +1118,7 @@ class AbstractPlugin
                 }
             } elseif ($orderBy) {
                 foreach (QueryHelper::parseOrderBy($orderBy) as $fieldNameAndSorting) {
-                    list($fieldName, $sorting) = $fieldNameAndSorting;
+                    [$fieldName, $sorting] = $fieldNameAndSorting;
                     $queryBuilder->addOrderBy($fieldName, $sorting);
                 }
             }
@@ -1223,7 +1223,7 @@ class AbstractPlugin
 
         if (!empty($orderBy)) {
             foreach (QueryHelper::parseOrderBy($orderBy) as $fieldNameAndSorting) {
-                list($fieldName, $sorting) = $fieldNameAndSorting;
+                [$fieldName, $sorting] = $fieldNameAndSorting;
                 $queryBuilder->addOrderBy($fieldName, $sorting);
             }
         }
index c463927..2ec10c6 100644 (file)
@@ -25,7 +25,7 @@ class EmailLinkBuilder extends AbstractTypolinkBuilder
      */
     public function build(array &$linkDetails, string $linkText, string $target, array $conf): array
     {
-        list($url, $linkText) = $this->contentObjectRenderer->getMailTo($linkDetails['email'], $linkText);
+        [$url, $linkText] = $this->contentObjectRenderer->getMailTo($linkDetails['email'], $linkText);
         return [$url, $linkText, $target];
     }
 }
index 51289d4..3837be1 100644 (file)
@@ -492,7 +492,7 @@ class PageLinkBuilder extends AbstractTypolinkBuilder
         if ($defaultMountPoints) {
             $defaultMountPoints = GeneralUtility::trimExplode('|', $defaultMountPoints, true);
             foreach ($defaultMountPoints as $temp_p) {
-                list($temp_idP, $temp_MPp) = explode(':', $temp_p, 2);
+                [$temp_idP, $temp_MPp] = explode(':', $temp_p, 2);
                 $temp_ids = GeneralUtility::intExplode(',', $temp_idP);
                 foreach ($temp_ids as $temp_id) {
                     $mountPointMap[$temp_id] = trim($temp_MPp);
index 03c5bea..bc4ad66 100644 (file)
@@ -4492,7 +4492,7 @@ class ContentObjectRendererTest extends UnitTestCase
             CacheManager::class,
             $cacheManager
         );
-        list($countCalls, $test) = [0, $this];
+        [$countCalls, $test] = [0, $this];
         $closure = function ($par1, $par2) use (
             $test,
             $subject,
index 6880379..95fda69 100644 (file)
@@ -446,7 +446,7 @@ class Export extends ImportExport
                             foreach ($subList['keys'] as $spKey => $elements) {
                                 foreach ($elements as $el) {
                                     if ($el['subst']['type'] === 'db' && $this->includeSoftref($el['subst']['tokenID'])) {
-                                        list($tempTable, $tempUid) = explode(':', $el['subst']['recordRef']);
+                                        [$tempTable, $tempUid] = explode(':', $el['subst']['recordRef']);
                                         $fI = [
                                             'table' => $tempTable,
                                             'id' => $tempUid
@@ -463,7 +463,7 @@ class Export extends ImportExport
                     foreach ($vR['softrefs']['keys'] as $spKey => $elements) {
                         foreach ($elements as $el) {
                             if ($el['subst']['type'] === 'db' && $this->includeSoftref($el['subst']['tokenID'])) {
-                                list($tempTable, $tempUid) = explode(':', $el['subst']['recordRef']);
+                                [$tempTable, $tempUid] = explode(':', $el['subst']['recordRef']);
                                 $fI = [
                                     'table' => $tempTable,
                                     'id' => $tempUid
index 54f6243..444ef5f 100644 (file)
@@ -1208,7 +1208,7 @@ class Import extends ImportExport
     public function remapListedDBRecords_flexFormCallBack($pParams, $dsConf, $dataValue, $dataValue_ext1, $dataValue_ext2, $path)
     {
         // Extract parameters:
-        list(, , , $config) = $pParams;
+        [, , , $config] = $pParams;
         // In case the $path is used as index without a trailing slash we will remove that
         if (!is_array($config['flexFormRels']['db'][$path]) && is_array($config['flexFormRels']['db'][rtrim($path, '/')])) {
             $path = rtrim($path, '/');
@@ -1325,7 +1325,7 @@ class Import extends ImportExport
     public function processSoftReferences_flexFormCallBack($pParams, $dsConf, $dataValue, $dataValue_ext1, $dataValue_ext2, $path)
     {
         // Extract parameters:
-        list($table, $origUid, $field, $softRefCfgs) = $pParams;
+        [$table, $origUid, $field, $softRefCfgs] = $pParams;
         if (is_array($softRefCfgs)) {
             // First, find all soft reference configurations for this structure path (they are listed flat in the header):
             $thisSoftRefCfgList = [];
@@ -1383,11 +1383,11 @@ class Import extends ImportExport
                         case 'db':
                         default:
                             // Trying to map database element if found in the mapID array:
-                            list($tempTable, $tempUid) = explode(':', $cfg['subst']['recordRef']);
+                            [$tempTable, $tempUid] = explode(':', $cfg['subst']['recordRef']);
                             if (isset($this->import_mapId[$tempTable][$tempUid])) {
                                 $insertValue = BackendUtility::wsMapId($tempTable, $this->import_mapId[$tempTable][$tempUid]);
                                 if (strpos($cfg['subst']['tokenValue'], ':') !== false) {
-                                    list($tokenKey) = explode(':', $cfg['subst']['tokenValue']);
+                                    [$tokenKey] = explode(':', $cfg['subst']['tokenValue']);
                                     $insertValue = $tokenKey . ':' . $insertValue;
                                 }
                             }
index 558db39..fda86d7 100644 (file)
@@ -635,7 +635,7 @@ abstract class ImportExport
                 $lines[] = $pInfo;
                 // Add relations:
                 if ($info['subst']['type'] === 'db') {
-                    list($tempTable, $tempUid) = explode(':', $info['subst']['recordRef']);
+                    [$tempTable, $tempUid] = explode(':', $info['subst']['recordRef']);
                     $this->addRelations([['table' => $tempTable, 'id' => $tempUid, 'tokenID' => $info['subst']['tokenID']]], $lines, $preCode_B, [], '');
                 }
                 // Add files:
index bb7367e..4eaaac5 100644 (file)
@@ -134,7 +134,7 @@ abstract class AbstractImportExportTestCase extends FunctionalTestCase
                         );
 
                     foreach (QueryHelper::parseOrderBy((string)$orderBy) as $orderPair) {
-                        list($fieldName, $order) = $orderPair;
+                        [$fieldName, $order] = $orderPair;
                         $queryBuilder->addOrderBy($fieldName, $order);
                     }
                     $queryBuilder->addOrderBy('uid', 'ASC');
index 0dfe8c6..b7a8ec0 100644 (file)
@@ -916,7 +916,7 @@ class IndexSearchRepository
             // Default value to protect against empty array.
             $list = [-99];
             foreach ($refs as $ref) {
-                list($table, $uid) = GeneralUtility::revExplode('_', $ref, 2);
+                [$table, $uid] = GeneralUtility::revExplode('_', $ref, 2);
                 $uid = (int)$uid;
                 $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)
                     ->getQueryBuilderForTable('index_config');
index bcb56d8..6c5fa04 100644 (file)
@@ -475,7 +475,7 @@ class FileContentParser
                     $pdfInfo = $this->splitPdfInfo($res);
                     unset($res);
                     if ((int)$pdfInfo['pages']) {
-                        list($low, $high) = explode('-', $cPKey);
+                        [$low, $high] = explode('-', $cPKey);
                         // Get pdf content:
                         $tempFileName = GeneralUtility::tempnam('Typo3_indexer');
                         // Create temporary name
index 79ea2c1..7d85cb5 100644 (file)
@@ -592,7 +592,7 @@ class CrawlerHook
     public function checkUrl($url, $urlLog, $baseUrl)
     {
         $url = preg_replace('/\\/\\/$/', '/', $url);
-        list($url) = explode('#', $url);
+        [$url] = explode('#', $url);
         if (strpos($url, '../') === false) {
             if (GeneralUtility::isFirstPartOfStr($url, $baseUrl)) {
                 if (!in_array($url, $urlLog)) {
index f84d90a..d13b7ff 100644 (file)
@@ -682,7 +682,7 @@ class Indexer
         if (!$isTagInText) {
             return false;
         }
-        list($paramList, $isTagInText) = explode('>', substr($isTagInText, strlen($startTag)), 2);
+        [$paramList, $isTagInText] = explode('>', substr($isTagInText, strlen($startTag)), 2);
         $afterTagInText = stristr($isTagInText, $endTag);
         if ($afterTagInText) {
             $stringBefore = substr($string, 0, strpos(strtolower($string), strtolower($startTag)));
@@ -904,7 +904,7 @@ class Indexer
                 if (trim($line) === '') {
                     break;
                 }
-                list($headKey, $headValue) = explode(':', $line, 2);
+                [$headKey, $headValue] = explode(':', $line, 2);
                 $retVal[$headKey] = $headValue;
             }
             return $retVal;
index 6fe5200..65f2293 100644 (file)
@@ -72,7 +72,7 @@ class Lexer
         $words = [];
         $this->debugString = '';
         while (1) {
-            list($start, $len) = $this->get_word($wordString, $pos);
+            [$start, $len] = $this->get_word($wordString, $pos);
             if ($len) {
                 $this->addWords($words, $wordString, $start, $len);
                 if ($this->debug) {
@@ -111,7 +111,7 @@ class Lexer
         // Get next chars unicode number and find type:
         $bc = 0;
         $cp = $this->utf8_ord($theWord, $bc);
-        list($cType) = $this->charType($cp);
+        [$cType] = $this->charType($cp);
         // If string is a CJK sequence we follow this algorithm:
         /*
         DESCRIPTION OF (CJK) ALGORITHMContinuous letters and numbers make up words. Spaces and symbols
@@ -233,7 +233,7 @@ class Lexer
             $pos += $bc;
             // Determine the type:
             $cType_prev = $cType;
-            list($cType) = $this->charType($cp);
+            [$cType] = $this->charType($cp);
             if ($cType) {
                 continue;
             }
index c932f1c..b623ef6 100644 (file)
@@ -84,9 +84,9 @@ class ImageMagick6Preset extends AbstractImagePreset
                 $firstResultLine = array_shift($executingResult);
                 // Example: "Version: ImageMagick 6.6.0-4 2012-05-02 Q16 http://www.imagemagick.org"
                 if (strpos($firstResultLine, 'ImageMagick') !== false) {
-                    list(, $version) = explode('ImageMagick', $firstResultLine);
+                    [, $version] = explode('ImageMagick', $firstResultLine);
                     // Example: "6.6.0-4"
-                    list($version) = explode(' ', trim($version));
+                    [$version] = explode(' ', trim($version));
                     if (version_compare($version, '6.0.0') >= 0) {
                         $this->foundPath = $path;
                         $result = true;
index 3dfad76..9a4d8e6 100644 (file)
@@ -895,8 +895,8 @@ class EnvironmentController extends AbstractController
         $string = $result[0];
         $version = '';
         if (!empty($string)) {
-            list(, $version) = explode('Magick', $string);
-            list($version) = explode(' ', trim($version));
+            [, $version] = explode('Magick', $string);
+            [$version] = explode(' ', trim($version));
             $version = trim($version);
         }
         return $version;
index 54bc273..c42b67f 100644 (file)
@@ -68,7 +68,7 @@ class IconController extends AbstractController
         $queryParams = $request->getQueryParams();
         $requestedIcon = json_decode($parsedBody['icon'] ?? $queryParams['icon'], true);
 
-        list($identifier, $size, $overlayIdentifier, $iconState, $alternativeMarkupIdentifier) = $requestedIcon;
+        [$identifier, $size, $overlayIdentifier, $iconState, $alternativeMarkupIdentifier] = $requestedIcon;
 
         if (empty($overlayIdentifier)) {
             $overlayIdentifier = null;
index 2358f63..042b91d 100644 (file)
@@ -53,9 +53,7 @@ class FileLinktype extends AbstractLinktype
         $resourceFactory = GeneralUtility::makeInstance(ResourceFactory::class);
         try {
             $file = $resourceFactory->retrieveFileOrFolderObject($url);
-        } catch (FileDoesNotExistException $e) {
-            return false;
-        } catch (FolderDoesNotExistException $e) {
+        } catch (FileDoesNotExistException|FolderDoesNotExistException $e) {
             return false;
         }
 
index a8f5fc0..f6be6cc 100644 (file)
@@ -51,7 +51,7 @@ class LinkHandler extends AbstractLinktype
             return $response;
         }
 
-        list(, $tableName, $rowid) = $parts;
+        [, $tableName, $rowid] = $parts;
         $rowid = (int)$rowid;
 
         $row = null;
index 72666a3..14114b5 100644 (file)
@@ -261,7 +261,7 @@ class CleanFlexFormsCommand extends Command
 
         // Loop through all tables and their records
         foreach ($records as $recordIdentifier => $fullRecord) {
-            list($table, $uid, $field) = explode(':', $recordIdentifier);
+            [$table, $uid, $field] = explode(':', $recordIdentifier);
             if ($io->isVerbose()) {
                 $io->writeln('Cleaning FlexForm XML in "' . $recordIdentifier . '"');
             }
index d0bc6f6..269b1c6 100644 (file)
@@ -312,7 +312,7 @@ class DatabaseIntegrityController
             // Call the functionality
             $refIndexObj = GeneralUtility::makeInstance(ReferenceIndex::class);
             $refIndexObj->enableRuntimeCache();
-            list(, $bodyContent) = $refIndexObj->updateIndex($testOnly);
+            [, $bodyContent] = $refIndexObj->updateIndex($testOnly);
             $this->view->assign('content', str_replace('##LF##', '<br />', $bodyContent));
         }
     }
index 069bff7..c42d6c6 100644 (file)
@@ -586,7 +586,7 @@ class DatabaseIntegrityCheck
         $fileFields = $this->getDBFields($searchTable);
         $theRecordList = [];
         foreach ($fileFields as $info) {
-            list($table, $field) = $info;
+            [$table, $field] = $info;
             $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable($table);
             $queryBuilder->getRestrictions()->removeAll();
             $queryResult = $queryBuilder
index fcbc21f..e1ea46e 100644 (file)
@@ -105,7 +105,7 @@ class ArrayBrowser
             if (is_object($value) && !$value instanceof \Traversable) {
                 $value = (array)$value;
             }
-            $isArray = is_array($value) || $value instanceof \Traversable;
+            $isArray = is_iterable($value);
             $isResult = (bool)$this->searchKeys[$depth];
             $isExpanded = $isArray && ($this->depthKeys[$depth] || $this->expAll);
             $output .= '<li' . ($isResult ? ' class="active"' : '') . '>';
index ab62fdb..6b018d0 100644 (file)
@@ -91,7 +91,7 @@ class OpenDocumentService
      */
     protected function storeOpenDocuments(array $openDocuments): void
     {
-        list(, $lastOpenDocumentIdentifier) = $this->backendUser->getModuleData('FormEngine', 'ses');
+        [, $lastOpenDocumentIdentifier] = $this->backendUser->getModuleData('FormEngine', 'ses');
         $this->backendUser->pushModuleData('FormEngine', [$openDocuments, $lastOpenDocumentIdentifier]);
     }
 
index 519e12b..39e1ae3 100644 (file)
@@ -144,7 +144,7 @@ abstract class AbstractElementBrowser
      */
     protected function getBParamDataAttributes()
     {
-        list($fieldRef, $rteParams, $rteConfig, , $irreObjectId) = explode('|', $this->bparams);
+        [$fieldRef, $rteParams, $rteConfig, , $irreObjectId] = explode('|', $this->bparams);
 
         return [
             'data-this-script-url' => strpos($this->thisScript, '?') === false ? $this->thisScript . '?' : $this->thisScript . '&',
index 836c105..221db43 100644 (file)
@@ -76,7 +76,7 @@ class DatabaseBrowser extends AbstractElementBrowser implements ElementBrowserIn
         $userTsConfig = $this->getBackendUser()->getTSConfig();
 
         $this->setTemporaryDbMounts();
-        list(, , , $allowedTables) = explode('|', $this->bparams);
+        [, , , $allowedTables] = explode('|', $this->bparams);
 
         // Making the browsable pagetree:
         $pageTree = GeneralUtility::makeInstance(ElementBrowserPageTreeView::class);
@@ -229,7 +229,7 @@ class DatabaseBrowser extends AbstractElementBrowser implements ElementBrowserIn
         $dbList->tableList = implode(',', $tablesArr);
 
         // a string like "data[pages][79][storage_pid]"
-        list($fieldPointerString) = explode('|', $this->bparams);
+        [$fieldPointerString] = explode('|', $this->bparams);
         // parts like: data, pages], 79], storage_pid]
         $fieldPointerParts = explode('[', $fieldPointerString);
         $relatingTableName = substr($fieldPointerParts[1], 0, -1);
index 34e96dd..231ef41 100644 (file)
@@ -120,7 +120,7 @@ class ElementBrowserController
 
             $backendUser = $this->getBackendUser();
             $modData = $backendUser->getModuleData('browse_links.php', 'ses');
-            list($modData) = $browser->processSessionData($modData);
+            [$modData] = $browser->processSessionData($modData);
             $backendUser->pushModuleData('browse_links.php', $modData);
 
             $content = $browser->render();
index 085c4e0..d230c93 100644 (file)
@@ -1321,7 +1321,7 @@ class DatabaseRecordList
             } elseif ($fCol === '_CLIPBOARD_') {
                 $theData[$fCol] = $this->makeClip($table, $row);
             } elseif ($fCol === '_LOCALIZATION_') {
-                list($lC1, $lC2) = $this->makeLocalizationPanel($table, $row);
+                [$lC1, $lC2] = $this->makeLocalizationPanel($table, $row);
                 $theData[$fCol] = $lC1;
                 $theData[$fCol . 'b'] = '<div class="btn-group">' . $lC2 . '</div>';
             } elseif ($fCol === '_LOCALIZATION_b') {
index e846f8c..b0ccd79 100644 (file)
@@ -177,7 +177,7 @@ class DeletedRecords
                 ->fetchColumn(0);
 
             // split the limit
-            list($offset, $rowCount) = GeneralUtility::intExplode(',', $this->limit, true);
+            [$offset, $rowCount] = GeneralUtility::intExplode(',', $this->limit, true);
             // subtract the number of deleted records from the limit's offset
             $result = $offset - $deletedCount;
             // if the result is >= 0
@@ -357,7 +357,7 @@ class DeletedRecords
             $tce->start([], []);
             $tce->disableDeleteClause();
             foreach ($recordsArray as $record) {
-                list($table, $uid) = explode(':', $record);
+                [$table, $uid] = explode(':', $record);
                 $tce->deleteEl($table, (int)$uid, true, true);
             }
             return true;
@@ -385,7 +385,7 @@ class DeletedRecords
             $this->deletedRows = [];
             $cmd = [];
             foreach ($recordsArray as $record) {
-                list($table, $uid) = explode(':', $record);
+                [$table, $uid] = explode(':', $record);
                 // get all parent pages and cover them
                 $pid = RecyclerUtility::getPidOfUid($uid, $table);
                 if ($pid > 0) {
index 8e9accb..1f15b65 100644 (file)
@@ -282,7 +282,7 @@ class RedirectService implements LoggerAwareInterface
             if ($redirectRecord['keep_query_parameters']) {
                 $configuration['additionalParams'] = HttpUtility::buildQueryString($queryParams, '&');
             }
-            list($url) = $linkBuilder->build($linkDetails, '', '', $configuration);
+            [$url] = $linkBuilder->build($linkDetails, '', '', $configuration);
             return new Uri($url);
         } catch (UnableToLinkException $e) {
             // This exception is also thrown by the DatabaseRecordTypolinkBuilder
index d62ab61..b7e44bc 100644 (file)
@@ -144,7 +144,7 @@ class ConfigurationStatus implements StatusProviderInterface
                         $testServer = substr($testServer, 6);
                     }
                     if (strpos($testServer, ':') !== false) {
-                        list($host, $port) = explode(':', $testServer, 2);
+                        [$host, $port] = explode(':', $testServer, 2);
                     } else {
                         $host = $testServer;
                         $port = $defaultMemcachedPort;
index 917dfed..7272f43 100644 (file)
@@ -125,7 +125,7 @@ Call it like this: typo3/sysext/core/bin/typo3 scheduler:run --task=13 -f')
             $task = $this->scheduler->fetchTask($taskUid);
         } else {
             $whereClause = 'uid = ' . (int)$taskUid . ' AND nextexecution != 0 AND nextexecution <= ' . $GLOBALS['EXEC_TIME'];
-            list($task) = $this->scheduler->fetchTasksWithCondition($whereClause);
+            [$task] = $this->scheduler->fetchTasksWithCondition($whereClause);
         }
 
         return $task;
index acd59b5..e5f3453 100644 (file)
@@ -127,9 +127,9 @@ class NormalizeCommand
             $fieldArray = [];
             foreach ($listOfCommaValues as $listElement) {
                 if (strpos($listElement, '/') !== false) {
-                    list($left, $right) = explode('/', $listElement);
+                    [$left, $right] = explode('/', $listElement);
                     if (strpos($left, '-') !== false) {
-                        list($leftBound, $rightBound) = explode('-', $left);
+                        [$leftBound, $rightBound] = explode('-', $left);
                         $leftBound = self::normalizeMonthAndWeekday($leftBound, $isMonthField);
                         $rightBound = self::normalizeMonthAndWeekday($rightBound, $isMonthField);
                         $left = $leftBound . '-' . $rightBound;
@@ -140,7 +140,7 @@ class NormalizeCommand
                     }
                     $fieldArray[] = $left . '/' . $right;
                 } elseif (strpos($listElement, '-') !== false) {
-                    list($left, $right) = explode('-', $listElement);
+                    [$left, $right] = explode('-', $listElement);
                     $left = self::normalizeMonthAndWeekday($left, $isMonthField);
                     $right = self::normalizeMonthAndWeekday($right, $isMonthField);
                     $fieldArray[] = $left . '-' . $right;
@@ -171,7 +171,7 @@ class NormalizeCommand
             $fieldArray = [];
             foreach ($listOfCommaValues as $listElement) {
                 if (strpos($listElement, '/') !== false) {
-                    list($left, $right) = explode('/', $listElement);
+                    [$left, $right] = explode('/', $listElement);
                     if ((string)$left === '*') {
                         $leftList = self::convertRangeToListOfValues($lowerBound . '-' . $upperBound);
                     } else {
index 28d1638..a5a74b7 100644 (file)
@@ -282,7 +282,7 @@ class TypoScriptTemplateObjectBrowserModuleFunctionController
         // EDIT A VALUE:
         $assigns['typoScriptPath'] = $sObj;
         if (!empty($sObj)) {
-            list($theSetup, $theSetupValue) = $this->templateService->ext_getSetup($theSetup, $sObj);
+            [$theSetup, $theSetupValue] = $this->templateService->ext_getSetup($theSetup, $sObj);
             $assigns['theSetupValue'] = $theSetupValue;
             if ($existTemplate === false) {
                 $noTemplateMessage = GeneralUtility::makeInstance(FlashMessage::class, $lang->getLL('noCurrentTemplate'), $lang->getLL('edit'), FlashMessage::ERROR);
@@ -339,7 +339,7 @@ class TypoScriptTemplateObjectBrowserModuleFunctionController
             if (!$theKey || !str_replace('-', '', $theKey)) {
                 $theKey = '';
             }
-            list($theSetup, $theSetupValue) = $this->templateService->ext_getSetup($theSetup, $this->pObj->MOD_SETTINGS['ts_browser_toplevel_' . $bType] ?: '');
+            [$theSetup, $theSetupValue] = $this->templateService->ext_getSetup($theSetup, $this->pObj->MOD_SETTINGS['ts_browser_toplevel_' . $bType] ?: '');
             $tree = $this->templateService->ext_getObjTree($theSetup, $theKey, '', '', $theSetupValue, $this->pObj->MOD_SETTINGS['ts_browser_alphaSort']);
             $tree = $this->templateService->substituteCMarkers($tree);
             $urlParameters = [
index 4c1750d..c4c362b 100644 (file)
@@ -132,8 +132,8 @@ class PreviewController
             $recursionLevel = 0,
             $selectionType = 'tables_modify'
         );
-        list(, $nextStage) = $this->stageService->getNextStageForElementCollection($workspaceItemsArray);
-        list(, $previousStage) = $this->stageService->getPreviousStageForElementCollection($workspaceItemsArray);
+        [, $nextStage] = $this->stageService->getNextStageForElementCollection($workspaceItemsArray);
+        [, $previousStage] = $this->stageService->getPreviousStageForElementCollection($workspaceItemsArray);
         $availableWorkspaces = $this->workspaceService->getAvailableWorkspaces();
         $activeWorkspace = $this->getBackendUser()->workspace;
         if ($previewWS !== null && array_key_exists($previewWS, $availableWorkspaces) && $activeWorkspace != $previewWS) {
index 38a58a6..2028077 100644 (file)
@@ -756,7 +756,7 @@ class ActionHandler
             $recursionLevel = 0,
             $selectionType = 'tables_modify'
         );
-        list($currentStage, $previousStage) = $this->stageService->getPreviousStageForElementCollection($workspaceItemsArray);
+        [$currentStage, $previousStage] = $this->stageService->getPreviousStageForElementCollection($workspaceItemsArray);
         // get only the relevant items for processing
         $workspaceItemsArray = $this->workspaceService->selectVersionsInWorkspace(
             $this->stageService->getWorkspaceId(),
@@ -790,7 +790,7 @@ class ActionHandler
             $recursionLevel = 0,
             $selectionType = 'tables_modify'
         );
-        list($currentStage, $nextStage) = $this->stageService->getNextStageForElementCollection($workspaceItemsArray);
+        [$currentStage, $nextStage] = $this->stageService->getNextStageForElementCollection($workspaceItemsArray);
         // get only the relevant items for processing
         $workspaceItemsArray = $this->workspaceService->selectVersionsInWorkspace(
             $this->stageService->getWorkspaceId(),
@@ -826,8 +826,8 @@ class ActionHandler
             $recursionLevel = 0,
             $selectionType = 'tables_modify'
         );
-        list(, $nextStage) = $this->stageService->getNextStageForElementCollection($workspaceItemsArray);
-        list(, $previousStage) = $this->stageService->getPreviousStageForElementCollection($workspaceItemsArray);
+        [, $nextStage] = $this->stageService->getNextStageForElementCollection($workspaceItemsArray);
+        [, $previousStage] = $this->stageService->getPreviousStageForElementCollection($workspaceItemsArray);
 
         $view = GeneralUtility::makeInstance(StandaloneView::class);
         $extensionPath = ExtensionManagementUtility::extPath('workspaces');
index 5295ca0..5515a59 100644 (file)
@@ -496,7 +496,7 @@ class DataHandlerHook
                             $allElements = explode(',', $elementName);
                             // Traverse them, and find the history of each
                             foreach ($allElements as $elRef) {
-                                list($eTable, $eUid) = explode(':', $elRef);
+                                [$eTable, $eUid] = explode(':', $elRef);
 
                                 $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)
                                     ->getQueryBuilderForTable('sys_log');
@@ -559,7 +559,7 @@ class DataHandlerHook
         if (!empty($emails)) {
             $previewUriBuilder = GeneralUtility::makeInstance(PreviewUriBuilder::class);
             // Path to record is found:
-            list($elementTable, $elementUid) = explode(':', $elementName);
+            [$elementTable, $elementUid] = explode(':', $elementName);
             $elementUid = (int)$elementUid;
             $elementRecord = BackendUtility::getRecord($elementTable, $elementUid);
             $recordTitle = BackendUtility::getRecordTitle($elementTable, $elementRecord);
index e4ffbd7..4464803 100644 (file)
@@ -172,7 +172,7 @@ class PreviewUriBuilder
                 $previewConfiguration = $pageTsConfig['options.']['workspaces.']['previewPageId'];
             }
             // Extract possible settings (e.g. "field:pid")
-            list($previewKey, $previewValue) = explode(':', $previewConfiguration, 2);
+            [$previewKey, $previewValue] = explode(':', $previewConfiguration, 2);
             if ($previewKey === 'field') {
                 $previewPageId = (int)$liveRecord[$previewValue];
             } else {