Skip to content

Commit 228e9ab

Browse files
Merge branch '2.6' into 2.7
* 2.6: [Routing][DependencyInjection] Support .yaml extension in YAML loaders [DX] improve file loader error for router/other resources in bundle [FrameworkBundle] Initialize translator with the default locale. [FrameworkBundle] Fix Routing\DelegatingLoader resiliency to fatal errors [2.6][Translation] remove duplicate code for loading catalogue. [HttpKernel] Cleanup ExceptionListener CS fixes [DependencyInjection] Show better error when the Yaml component is not installed [2.3] SCA for Components - reference mismatches [Debug] Scream as LogLevel::DEBUG (but for fatal errors / uncaught exceptions) [2.3] Static Code Analysis for Components [WebProfilerBundle] Fix resiliency to exceptions thrown by the url generator [Translation] LoggingTranslator simplifications [Translation][fixed test] refresh cache when resources are no longer fresh. [FrameworkBundle] Fixed server:start --router relative path issue #14124 [FrameworkBundle] improve usage of Table helper [Validator] Added missing Simplified Chinese (zh_CN) translations [FrameworkBundle] Workaround php -S ignoring auto_prepend_file Conflicts: src/Symfony/Bundle/FrameworkBundle/Tests/Translation/TranslatorTest.php src/Symfony/Component/Console/Helper/Table.php src/Symfony/Component/Translation/LoggingTranslator.php
2 parents fad1d15 + d3a7d1d commit 228e9ab

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

Extension/Core/DataTransformer/BaseDateTimeTransformer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@ abstract class BaseDateTimeTransformer implements DataTransformerInterface
4040
*/
4141
public function __construct($inputTimezone = null, $outputTimezone = null)
4242
{
43-
if (!is_string($inputTimezone) && null !== $inputTimezone) {
43+
if (null !== $inputTimezone && !is_string($inputTimezone)) {
4444
throw new UnexpectedTypeException($inputTimezone, 'string');
4545
}
4646

47-
if (!is_string($outputTimezone) && null !== $outputTimezone) {
47+
if (null !== $outputTimezone && !is_string($outputTimezone)) {
4848
throw new UnexpectedTypeException($outputTimezone, 'string');
4949
}
5050

Extension/Core/DataTransformer/DateTimeToArrayTransformer.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ public function transform($dateTime)
9999
// remove leading zeros
100100
$entry = (string) (int) $entry;
101101
}
102+
// unset reference to keep scope clear
103+
unset($entry);
102104
}
103105

104106
return $result;

Extension/Core/EventListener/MergeCollectionListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public function onSubmit(FormEvent $event)
7474
}
7575

7676
// If we are not allowed to change anything, return immediately
77-
if ((!$this->allowAdd && !$this->allowDelete) || $data === $dataToMergeInto) {
77+
if ($data === $dataToMergeInto || (!$this->allowAdd && !$this->allowDelete)) {
7878
$event->setData($dataToMergeInto);
7979

8080
return;

0 commit comments

Comments
 (0)