Skip to content

Commit

Permalink
Merge pull request #1506 from schmittjoh/rever-null-metadata
Browse files Browse the repository at this point in the history
do not return null when no annotations or attributes are found by the…
  • Loading branch information
goetas authored Aug 3, 2023
2 parents a3fd2a5 + 9570d11 commit 60e0e29
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/Metadata/Driver/AnnotationDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
use JMS\Serializer\Naming\PropertyNamingStrategyInterface;
use JMS\Serializer\Type\ParserInterface;

/**
* @deprecated
*/
class AnnotationDriver extends AnnotationOrAttributeDriver
{
/**
Expand Down
3 changes: 2 additions & 1 deletion src/Metadata/Driver/AnnotationOrAttributeDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,8 @@ public function loadMetadataForClass(\ReflectionClass $class): ?BaseClassMetadat
}

if (!$configured) {

Check failure on line 292 in src/Metadata/Driver/AnnotationOrAttributeDriver.php

View workflow job for this annotation

GitHub Actions / Coding Standards (7.2)

Empty IF statement detected
return null;
// return null;
// uncomment the above line afetr a couple of months
}

return $classMetadata;
Expand Down

0 comments on commit 60e0e29

Please sign in to comment.