Skip to content

Commit 58e1569

Browse files
[ErrorHandler] fix on patching return types on Windows
1 parent 646c33f commit 58e1569

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/Symfony/Component/ErrorHandler/Internal/TentativeTypes.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class TentativeTypes
3030
'format' => 'string',
3131
'getTimezone' => 'DateTimeZone|false',
3232
'getOffset' => 'int',
33-
'getTimestamp' => 'int|false',
33+
'getTimestamp' => 'int',
3434
'diff' => 'DateInterval',
3535
'__wakeup' => 'void',
3636
],
@@ -254,6 +254,7 @@ class TentativeTypes
254254
'isEquivalentTo' => 'bool',
255255
'isLenient' => 'bool',
256256
'isWeekend' => 'bool',
257+
'roll' => 'bool',
257258
'isSet' => 'bool',
258259
'setTime' => 'bool',
259260
'setTimeZone' => 'bool',

src/Symfony/Component/ErrorHandler/Resources/bin/patch-type-declarations

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ set_error_handler(function ($type, $msg, $file, $line, $context = []) use (&$dep
7171

7272
$exclude = getenv('SYMFONY_PATCH_TYPE_EXCLUDE') ?: null;
7373
foreach ($loader->getClassMap() as $class => $file) {
74-
if (false !== strpos($file = realpath($file), '/vendor/')) {
74+
if (false !== strpos($file = realpath($file), \DIRECTORY_SEPARATOR.'vendor'.\DIRECTORY_SEPARATOR)) {
7575
continue;
7676
}
7777

0 commit comments

Comments
 (0)