Merge branch 'release/2.0.3'
This commit is contained in:
commit
0f9c5f4697
4 changed files with 11 additions and 7 deletions
|
@ -31,8 +31,7 @@ class Package extends BasePackage
|
|||
|
||||
$dispatcher = $bootstrap->getSignalSlotDispatcher();
|
||||
$dispatcher->connect(ConfigurationManager::class, 'configurationManagerReady',
|
||||
function ($configurationManager) {
|
||||
/* @var ConfigurationManager $configurationManager */
|
||||
function (ConfigurationManager $configurationManager) {
|
||||
$configurationManager->registerConfigurationType(
|
||||
static::CONFIGURATION_TYPE_VALIDATION,
|
||||
ConfigurationManager::CONFIGURATION_PROCESSING_TYPE_DEFAULT,
|
||||
|
|
|
@ -126,7 +126,7 @@ class SettingsValidator extends AbstractValidator
|
|||
}
|
||||
|
||||
/**
|
||||
* @param $name
|
||||
* @param string $name
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
|
|
|
@ -28,15 +28,20 @@ class Version20170603120900 extends AbstractMigration
|
|||
*/
|
||||
public function up()
|
||||
{
|
||||
$this->processConfiguration(Package::CONFIGURATION_TYPE_VALIDATION,
|
||||
$this->processConfiguration(
|
||||
Package::CONFIGURATION_TYPE_VALIDATION,
|
||||
function (&$configuration) {
|
||||
foreach ($configuration as $validatorName => &$validators) {
|
||||
// guard that protects configuration, which has already the new format:
|
||||
if (isset($validators['properties']) || isset($validators['self'])) {
|
||||
continue;
|
||||
}
|
||||
$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.');
|
||||
'validation: "' . $validatorName . '.' . $key . '". It was not migrated.');
|
||||
continue;
|
||||
}
|
||||
if (isset($validator['property'])) {
|
||||
|
|
|
@ -16,7 +16,7 @@ class TestObject
|
|||
protected $shouldBeFalse = true;
|
||||
|
||||
/**
|
||||
* @Flow\Validate(type="DigiComp.SettingValidator:Settings", options={"name": "TrueValidator"})
|
||||
* @Flow\Validate(type="DigiComp.SettingValidator:Settings", options={"name"="TrueValidator"})
|
||||
* @var bool
|
||||
*/
|
||||
protected $shouldBeTrueAndValidatedByAnnotation = false;
|
||||
|
|
Loading…
Reference in a new issue