We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b2a1be5 commit 089d8b2Copy full SHA for 089d8b2
src/Doctrine/Entity/Version.php
@@ -113,8 +113,13 @@ public function getPackage(): ?Package
113
return $this->package;
114
}
115
116
- public function getCurrentMetadata(): ?Metadata
+ public function getCurrentMetadata(): Metadata
117
{
118
+ if (null === $this->currentMetadata) {
119
+ // Packages are only allowed to have no current metadata during import
120
+ throw new \RuntimeException(sprintf('No current metadata found for package: %s %s', $this->package->getName(), $this->name));
121
+ }
122
+
123
return $this->currentMetadata;
124
125
0 commit comments