processConfiguration(Package::CONFIGURATION_TYPE_VALIDATION, function (&$configuration) { foreach ($configuration as $validatorName => &$validators) { $newConfiguration = ['properties' => [], 'self' => []]; foreach ($validators as $key => &$validator) { if (! isset($validator['validator']) || ! isset($validator['options'])) { $this->showWarning('The Validation.yaml files contained no validator or options for ' . 'validation: "' . $validatorName . '.' . $key . '". It was not be migrated.'); continue; } if (isset($validator['property'])) { $newConfiguration['properties'][$validator['property']][$validator['validator']] = $validator['options']; } else { $newConfiguration['self'][$validator['validator']] = $validator['options']; } } $validators = $newConfiguration; } }, true ); } }