[DI][Form] Fixed test suite (TimeType changes & unresolved merge conflict)
This commit is contained in:
parent
14f2d22158
commit
18f5b17249
@ -994,13 +994,8 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
|
|||||||
|
|
||||||
$id = (string) $id;
|
$id = (string) $id;
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
if ('' === $id || '\\' === $id[-1] || \strlen($id) !== strcspn($id, "\0\r\n'")) {
|
if ('' === $id || '\\' === $id[-1] || \strlen($id) !== strcspn($id, "\0\r\n'")) {
|
||||||
throw new InvalidArgumentException(sprintf('Invalid service id: "%s"', $id));
|
|
||||||
=======
|
|
||||||
if ('' === $id || '\\' === substr($id, -1) || \strlen($id) !== strcspn($id, "\0\r\n'")) {
|
|
||||||
throw new InvalidArgumentException(sprintf('Invalid service id: "%s".', $id));
|
throw new InvalidArgumentException(sprintf('Invalid service id: "%s".', $id));
|
||||||
>>>>>>> 3.4
|
|
||||||
}
|
}
|
||||||
|
|
||||||
unset($this->aliasDefinitions[$id], $this->removedIds[$id]);
|
unset($this->aliasDefinitions[$id], $this->removedIds[$id]);
|
||||||
|
@ -60,8 +60,6 @@ class TimeType extends AbstractType
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ('single_text' === $options['widget']) {
|
if ('single_text' === $options['widget']) {
|
||||||
$builder->addViewTransformer(new DateTimeToStringTransformer($options['model_timezone'], $options['view_timezone'], $format));
|
|
||||||
|
|
||||||
$builder->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $e) use ($options) {
|
$builder->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $e) use ($options) {
|
||||||
$data = $e->getData();
|
$data = $e->getData();
|
||||||
if ($data && preg_match('/^(?P<hours>\d{2}):(?P<minutes>\d{2})(?::(?P<seconds>\d{2})(?:\.\d+)?)?$/', $data, $matches)) {
|
if ($data && preg_match('/^(?P<hours>\d{2}):(?P<minutes>\d{2})(?::(?P<seconds>\d{2})(?:\.\d+)?)?$/', $data, $matches)) {
|
||||||
@ -86,6 +84,8 @@ class TimeType extends AbstractType
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$builder->addViewTransformer(new DateTimeToStringTransformer($options['model_timezone'], $options['view_timezone'], $format));
|
||||||
} else {
|
} else {
|
||||||
$hourOptions = $minuteOptions = $secondOptions = [
|
$hourOptions = $minuteOptions = $secondOptions = [
|
||||||
'error_bubbling' => true,
|
'error_bubbling' => true,
|
||||||
|
Reference in New Issue
Block a user