Skip to content

Commit 2f0a38a

Browse files
Merge branch '5.4' into 6.0
* 5.4: [WebProfilerBundle] Tweak the colors of the security panel Add a setter on DateTimeNormalizer to change the default context at runtime [FrameworkBundle] Fix default PHP attributes support in validation and serializer configuration when doctrine/annotations is not installed with PHP 8
2 parents f2e129b + 48700d9 commit 2f0a38a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Normalizer/DateTimeNormalizer.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ class DateTimeNormalizer implements NormalizerInterface, DenormalizerInterface,
3838
];
3939

4040
public function __construct(array $defaultContext = [])
41+
{
42+
$this->setDefaultContext($defaultContext);
43+
}
44+
45+
public function setDefaultContext(array $defaultContext): void
4146
{
4247
$this->defaultContext = array_merge($this->defaultContext, $defaultContext);
4348
}

0 commit comments

Comments
 (0)