Skip to content

Commit 0b0ba7a

Browse files
Merge branch '6.0' into 6.1
* 6.0: [Semaphore] fix tests [HttpClient] fix destructing CurlResponse [Cache] Fix connecting to Redis via a socket file [DependencyInjection][FrameworkBundle] Fix using PHP 8.1 enum as parameters [PropertyAccessor] Add missing TypeError catch [HttpKernel] Fixed error count by log not displayed in WebProfilerBundle Added `kernel.event_listener` to the default list of behavior describing tags, fixing AsEventListener attribute not working on decorators. [HttpKernel] Fix FileLinkFormatter with empty xdebug.file_link_format [WebProfilerBundle] Fixes weird spacing in log message context/trace output [Notifier] fix Microsoft Teams webhook url [FrameworkBundle] Fix log channel of TagAwareAdapter [Postmark] ensure only a single tag can be used with Postmark [Mailer] allow Mailchimp to handle multiple TagHeader's [HttpClient] Fix Content-Length header when possible [Routing] AnnotationDirectoryLoader::load() may return null [DependencyInjection] Don't dump polyfilled classes in preload script
2 parents c9678d0 + a738b15 commit 0b0ba7a

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

Loader/AnnotationDirectoryLoader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class AnnotationDirectoryLoader extends AnnotationFileLoader
2525
/**
2626
* @throws \InvalidArgumentException When the directory does not exist or its routes cannot be parsed
2727
*/
28-
public function load(mixed $path, string $type = null): RouteCollection
28+
public function load(mixed $path, string $type = null): ?RouteCollection
2929
{
3030
if (!is_dir($dir = $this->locator->locate($path))) {
3131
return parent::supports($path, $type) ? parent::load($path, $type) : new RouteCollection();

Tests/Loader/AnnotationDirectoryLoaderTest.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,14 @@ public function testLoadFileIfLocatedResourceIsFile()
9999
$this->loader->load(__DIR__.'/../Fixtures/AnnotatedClasses/FooClass.php');
100100
}
101101

102+
public function testLoadAbstractClass()
103+
{
104+
$this->reader->expects($this->never())->method('getClassAnnotation');
105+
$this->reader->expects($this->never())->method('getMethodAnnotations');
106+
107+
$this->loader->load(__DIR__.'/../Fixtures/AnnotatedClasses/AbstractClass.php');
108+
}
109+
102110
private function expectAnnotationsToBeReadFrom(array $classes)
103111
{
104112
$this->reader->expects($this->exactly(\count($classes)))

0 commit comments

Comments
 (0)