Skip to content

Commit 9aa1c0f

Browse files
Fix merge
1 parent dfa4831 commit 9aa1c0f

File tree

2 files changed

+25
-25
lines changed

2 files changed

+25
-25
lines changed

src/Symfony/Component/ErrorHandler/Tests/DebugClassLoaderTest.php

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class DebugClassLoaderTest extends TestCase
2727
protected function setUp(): void
2828
{
2929
$this->patchTypes = getenv('SYMFONY_PATCH_TYPE_DECLARATIONS');
30-
$this->errorReporting = error_reporting(E_ALL);
30+
$this->errorReporting = error_reporting(\E_ALL);
3131
putenv('SYMFONY_PATCH_TYPE_DECLARATIONS=deprecations=1');
3232
$this->loader = [new DebugClassLoader([new ClassLoader(), 'loadClass']), 'loadClass'];
3333
spl_autoload_register($this->loader, true, true);
@@ -132,7 +132,7 @@ class_exists('Test\\'.__NAMESPACE__.'\\'.$class, true);
132132
unset($lastError['file'], $lastError['line']);
133133

134134
$xError = [
135-
'type' => E_USER_DEPRECATED,
135+
'type' => \E_USER_DEPRECATED,
136136
'message' => 'The "Test\Symfony\Component\ErrorHandler\Tests\\'.$class.'" class '.$type.' "Symfony\Component\ErrorHandler\Tests\Fixtures\\'.$super.'" that is deprecated but this is a test deprecation notice.',
137137
];
138138

@@ -151,7 +151,7 @@ public function testInterfaceExtendsDeprecatedInterface()
151151
{
152152
set_error_handler(fn () => false);
153153
$e = error_reporting(0);
154-
trigger_error('', E_USER_NOTICE);
154+
trigger_error('', \E_USER_NOTICE);
155155

156156
class_exists('Test\\'.NonDeprecatedInterfaceClass::class, true);
157157

@@ -162,7 +162,7 @@ class_exists('Test\\'.NonDeprecatedInterfaceClass::class, true);
162162
unset($lastError['file'], $lastError['line']);
163163

164164
$xError = [
165-
'type' => E_USER_NOTICE,
165+
'type' => \E_USER_NOTICE,
166166
'message' => '',
167167
];
168168

@@ -173,7 +173,7 @@ public function testDeprecatedSuperInSameNamespace()
173173
{
174174
set_error_handler(fn () => false);
175175
$e = error_reporting(0);
176-
trigger_error('', E_USER_NOTICE);
176+
trigger_error('', \E_USER_NOTICE);
177177

178178
class_exists(ExtendsDeprecatedParent::class, true);
179179

@@ -184,7 +184,7 @@ class_exists(ExtendsDeprecatedParent::class, true);
184184
unset($lastError['file'], $lastError['line']);
185185

186186
$xError = [
187-
'type' => E_USER_NOTICE,
187+
'type' => \E_USER_NOTICE,
188188
'message' => '',
189189
];
190190

@@ -195,7 +195,7 @@ public function testExtendedFinalClass()
195195
{
196196
$deprecations = [];
197197
set_error_handler(function ($type, $msg) use (&$deprecations) { $deprecations[] = $msg; });
198-
$e = error_reporting(E_USER_DEPRECATED);
198+
$e = error_reporting(\E_USER_DEPRECATED);
199199

200200
require __DIR__.'/Fixtures/FinalClasses.php';
201201

@@ -224,7 +224,7 @@ public function testExtendedFinalMethod()
224224
{
225225
$deprecations = [];
226226
set_error_handler(function ($type, $msg) use (&$deprecations) { $deprecations[] = $msg; });
227-
$e = error_reporting(E_USER_DEPRECATED);
227+
$e = error_reporting(\E_USER_DEPRECATED);
228228

229229
class_exists(Fixtures\ExtendedFinalMethod::class, true);
230230

@@ -243,7 +243,7 @@ public function testExtendedDeprecatedMethodDoesntTriggerAnyNotice()
243243
{
244244
set_error_handler(fn () => false);
245245
$e = error_reporting(0);
246-
trigger_error('', E_USER_NOTICE);
246+
trigger_error('', \E_USER_NOTICE);
247247

248248
class_exists('Test\\'.ExtendsAnnotatedClass::class, true);
249249

@@ -253,14 +253,14 @@ class_exists('Test\\'.ExtendsAnnotatedClass::class, true);
253253
$lastError = error_get_last();
254254
unset($lastError['file'], $lastError['line']);
255255

256-
$this->assertSame(['type' => E_USER_NOTICE, 'message' => ''], $lastError);
256+
$this->assertSame(['type' => \E_USER_NOTICE, 'message' => ''], $lastError);
257257
}
258258

259259
public function testInternalsUse()
260260
{
261261
$deprecations = [];
262262
set_error_handler(function ($type, $msg) use (&$deprecations) { $deprecations[] = $msg; });
263-
$e = error_reporting(E_USER_DEPRECATED);
263+
$e = error_reporting(\E_USER_DEPRECATED);
264264

265265
class_exists('Test\\'.ExtendsInternals::class, true);
266266

@@ -279,7 +279,7 @@ public function testExtendedMethodDefinesNewParameters()
279279
{
280280
$deprecations = [];
281281
set_error_handler(function ($type, $msg) use (&$deprecations) { $deprecations[] = $msg; });
282-
$e = error_reporting(E_USER_DEPRECATED);
282+
$e = error_reporting(\E_USER_DEPRECATED);
283283

284284
class_exists(Fixtures\SubClassWithAnnotatedParameters::class, true);
285285

@@ -301,7 +301,7 @@ public function testUseTraitWithInternalMethod()
301301
{
302302
$deprecations = [];
303303
set_error_handler(function ($type, $msg) use (&$deprecations) { $deprecations[] = $msg; });
304-
$e = error_reporting(E_USER_DEPRECATED);
304+
$e = error_reporting(\E_USER_DEPRECATED);
305305

306306
class_exists('Test\\'.UseTraitWithInternalMethod::class, true);
307307

@@ -315,7 +315,7 @@ public function testVirtualUse()
315315
{
316316
$deprecations = [];
317317
set_error_handler(function ($type, $msg) use (&$deprecations) { $deprecations[] = $msg; });
318-
$e = error_reporting(E_USER_DEPRECATED);
318+
$e = error_reporting(\E_USER_DEPRECATED);
319319

320320
class_exists('Test\\'.ExtendsVirtual::class, true);
321321

@@ -345,7 +345,7 @@ public function testVirtualUseWithMagicCall()
345345
{
346346
$deprecations = [];
347347
set_error_handler(function ($type, $msg) use (&$deprecations) { $deprecations[] = $msg; });
348-
$e = error_reporting(E_USER_DEPRECATED);
348+
$e = error_reporting(\E_USER_DEPRECATED);
349349

350350
class_exists('Test\\'.ExtendsVirtualMagicCall::class, true);
351351

@@ -364,7 +364,7 @@ public function testReturnType()
364364
{
365365
$deprecations = [];
366366
set_error_handler(function ($type, $msg) use (&$deprecations) { $deprecations[] = $msg; });
367-
$e = error_reporting(E_USER_DEPRECATED);
367+
$e = error_reporting(\E_USER_DEPRECATED);
368368

369369
class_exists('Test\\'.ReturnType::class, true);
370370

@@ -409,7 +409,7 @@ public function testReturnTypePhp83()
409409
{
410410
$deprecations = [];
411411
set_error_handler(function ($type, $msg) use (&$deprecations) { $deprecations[] = $msg; });
412-
$e = error_reporting(E_USER_DEPRECATED);
412+
$e = error_reporting(\E_USER_DEPRECATED);
413413

414414
class_exists('Test\\'.ReturnTypePhp83::class, true);
415415

@@ -425,7 +425,7 @@ public function testOverrideFinalProperty()
425425
{
426426
$deprecations = [];
427427
set_error_handler(function ($type, $msg) use (&$deprecations) { $deprecations[] = $msg; });
428-
$e = error_reporting(E_USER_DEPRECATED);
428+
$e = error_reporting(\E_USER_DEPRECATED);
429429

430430
class_exists(Fixtures\OverrideFinalProperty::class, true);
431431
class_exists(Fixtures\FinalProperty\OverrideFinalPropertySameNamespace::class, true);
@@ -446,7 +446,7 @@ public function testOverrideFinalConstant()
446446
{
447447
$deprecations = [];
448448
set_error_handler(function ($type, $msg) use (&$deprecations) { $deprecations[] = $msg; });
449-
$e = error_reporting(E_USER_DEPRECATED);
449+
$e = error_reporting(\E_USER_DEPRECATED);
450450

451451
class_exists(Fixtures\FinalConstant\OverrideFinalConstant::class, true);
452452

@@ -463,9 +463,9 @@ public function testOverrideFinalConstant81()
463463
{
464464
$deprecations = [];
465465
set_error_handler(function ($type, $msg) use (&$deprecations) { $deprecations[] = $msg; });
466-
$e = error_reporting(E_USER_DEPRECATED);
466+
$e = error_reporting(\E_USER_DEPRECATED);
467467

468-
class_exists( Fixtures\FinalConstant\OverrideFinalConstant81::class, true);
468+
class_exists(Fixtures\FinalConstant\OverrideFinalConstant81::class, true);
469469

470470
error_reporting($e);
471471
restore_error_handler();
@@ -514,7 +514,7 @@ public function findFile($class)
514514
eval('namespace Test\\'.__NAMESPACE__.'; class NonDeprecatedInterfaceClass implements \\'.__NAMESPACE__.'\Fixtures\NonDeprecatedInterface {}');
515515
} elseif ('Test\\'.Float::class === $class) {
516516
eval('namespace Test\\'.__NAMESPACE__.'; class Float {}');
517-
} elseif (str_starts_with($class, 'Test\\' . ExtendsFinalClass::class)) {
517+
} elseif (str_starts_with($class, 'Test\\'.ExtendsFinalClass::class)) {
518518
$classShortName = substr($class, strrpos($class, '\\') + 1);
519519
eval('namespace Test\\'.__NAMESPACE__.'; class '.$classShortName.' extends \\'.__NAMESPACE__.'\Fixtures\\'.substr($classShortName, 7).' {}');
520520
} elseif ('Test\\'.ExtendsAnnotatedClass::class === $class) {

src/Symfony/Component/Messenger/Tests/Command/FailedMessagesShowCommandTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ public function testListMessagesWithServiceLocator()
176176
$tester->setInputs([0]);
177177
$tester->execute([]);
178178

179-
$this->assertStringContainsString(sprintf(<<<EOF
179+
$this->assertStringContainsString(\sprintf(<<<EOF
180180
15 stdClass %s Things are bad!
181181
EOF
182182
,
@@ -334,7 +334,7 @@ public function testVeryVerboseOutputForSingleMessageContainsExceptionWithTraceW
334334
$command = new FailedMessagesShowCommand($failureTransportName, $serviceLocator);
335335
$tester = new CommandTester($command);
336336
$tester->execute(['id' => 42], ['verbosity' => OutputInterface::VERBOSITY_VERY_VERBOSE]);
337-
$this->assertStringMatchesFormat(sprintf(<<<'EOF'
337+
$this->assertStringMatchesFormat(\sprintf(<<<'EOF'
338338
%%A
339339
Exception:
340340
==========
@@ -384,7 +384,7 @@ public function testListMessagesWithServiceLocatorFromSpecificTransport()
384384

385385
$tester = new CommandTester($command);
386386
$tester->execute(['--transport' => $failureTransportName]);
387-
$this->assertStringContainsString(sprintf(<<<EOF
387+
$this->assertStringContainsString(\sprintf(<<<EOF
388388
15 stdClass %s Things are bad!
389389
EOF
390390
,

0 commit comments

Comments
 (0)