Skip to content

Commit 2fcb883

Browse files
staabmsebastianbergmann
authored andcommitted
Reflect endless loop preventing fix in AnnotationParser->forMethod()
1 parent 6613e40 commit 2fcb883

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Metadata/Parser/AnnotationParser.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -429,15 +429,15 @@ public function forMethod(string $className, string $methodName): MetadataCollec
429429
if (!empty($result) &&
430430
!isset(self::$deprecationEmittedForMethod[$className . '::' . $methodName]) &&
431431
!str_starts_with($className, 'PHPUnit\TestFixture')) {
432+
self::$deprecationEmittedForMethod[$className . '::' . $methodName] = true;
433+
432434
EventFacade::emitter()->testRunnerTriggeredPhpunitDeprecation(
433435
sprintf(
434436
'Metadata found in doc-comment for method %s::%s(). Metadata in doc-comments is deprecated and will no longer be supported in PHPUnit 12. Update your test code to use attributes instead.',
435437
$className,
436438
$methodName,
437439
),
438440
);
439-
440-
self::$deprecationEmittedForMethod[$className . '::' . $methodName] = true;
441441
}
442442

443443
return MetadataCollection::fromArray($result);

0 commit comments

Comments
 (0)