Skip to content

Commit 49d14eb

Browse files
committed
Merge branch '5.4' into 6.0
* 5.4: Bump license year Bump license year [Validator] Error using CssColor with doctrine annotations [HttpClient] Turn negative timeout to a very long timeout Features goes to 6.x branch [Translation] [LocoProvider] Fix use of asset ids fix lowest required PropertyInfo component release [Validator] throw when Constraint::_construct() has not been called Bump Symfony version to 5.4.3 Update VERSION for 5.4.2 Update CHANGELOG for 5.4.2 Bump Symfony version to 5.3.14 Update VERSION for 5.3.13 Update CHANGELOG for 5.3.13 Bump Symfony version to 4.4.37 Update VERSION for 4.4.36 Update CONTRIBUTORS for 4.4.36 Update CHANGELOG for 4.4.36 Allow symfony/runtime plugin
2 parents 550557c + a94e6d8 commit 49d14eb

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

Constraint.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,10 @@ public function __isset(string $option): bool
224224
*/
225225
public function addImplicitGroupName(string $group)
226226
{
227+
if (null === $this->groups && \array_key_exists('groups', (array) $this)) {
228+
throw new \LogicException(sprintf('"%s::$groups" is set to null. Did you forget to call "%s::__construct()"?', static::class, self::class));
229+
}
230+
227231
if (\in_array(self::DEFAULT_GROUP, $this->groups) && !\in_array($group, $this->groups)) {
228232
$this->groups[] = $group;
229233
}

Constraints/CssColor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public function __construct($formats = [], string $message = null, array $groups
7272
if (!$formats) {
7373
$options['value'] = self::$validationModes;
7474
} elseif (\is_array($formats) && \is_string(key($formats))) {
75-
$options = array_merge($formats, $options);
75+
$options = array_merge($formats, $options ?? []);
7676
} elseif (\is_array($formats)) {
7777
if ([] === array_intersect(self::$validationModes, $formats)) {
7878
throw new InvalidArgumentException(sprintf('The "formats" parameter value is not valid. It must contain one or more of the following values: "%s".', $validationModesAsString));

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2004-2021 Fabien Potencier
1+
Copyright (c) 2004-2022 Fabien Potencier
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

0 commit comments

Comments
 (0)