getSerializedDependencies(), ['allowed_classes' => false]); } $emConf = $this->fixEmConf($extensionData['EM_CONF']); $emConf = var_export($emConf, true); $code = 'stringToDependency($emConf['dependencies'] ?? ''); if (isset($emConf['PHP_version']) && (string)$emConf['PHP_version'] !== '') { $emConf['constraints']['depends']['php'] = $emConf['PHP_version']; } if (isset($emConf['TYPO3_version']) && (string)$emConf['TYPO3_version'] !== '') { $emConf['constraints']['depends']['typo3'] = $emConf['TYPO3_version']; } } if (!isset($emConf['constraints']) || !isset($emConf['constraints']['conflicts'])) { $emConf['constraints']['conflicts'] = $this->stringToDependency($emConf['conflicts'] ?? ''); } if (!isset($emConf['constraints']) || !isset($emConf['constraints']['suggests'])) { $emConf['constraints']['suggests'] = []; } } // Remove TER v1-style entries unset($emConf['dependencies']); unset($emConf['conflicts']); unset($emConf['suggests']); unset($emConf['private']); unset($emConf['download_password']); unset($emConf['TYPO3_version']); unset($emConf['PHP_version']); unset($emConf['internal']); unset($emConf['module']); unset($emConf['loadOrder']); unset($emConf['lockType']); unset($emConf['shy']); unset($emConf['priority']); unset($emConf['modify_tables']); unset($emConf['CGLcompliance']); unset($emConf['CGLcompliance_note']); return $emConf; } /** * Checks whether the passed dependency is TER-style (string)or * TER2-style (array)and returns a single string for displaying the * dependencies. * * It leaves out all version numbers and the "php" and "typo3" dependencies, * as they are implicit and of no interest without the version number. * * @param mixed $dependency Either a string or an array listing dependencies. * @return array A simple dependency list for display */ public function stringToDependency($dependency) { $constraint = []; if (is_string($dependency) && $dependency !== '') { $dependency = explode(',', $dependency); foreach ($dependency as $v) { $constraint[$v] = ''; } } return $constraint; } }