You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: rector.php
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -26,6 +26,7 @@
26
26
27
27
$rectorConfig->skip([
28
28
TypedPropertyFromAssignsRector::class => [
29
+
__DIR__.'/src/Mapping/MappedEventSubscriber.php', // Rector is trying to set a type on the $annotationReader property which requires a union type, not supported on PHP 7.4
29
30
__DIR__.'/tests/Gedmo/Wrapper/Fixture/Entity/CompositeRelation.php', // @todo: remove this when https://github.com/doctrine/orm/issues/8255 is solved
if ($originalDriverClassName !== $driverClassName) {
223
+
thrownewRuntimeException("Failed to create mapping driver: ({$originalDriverClassName}), the extension driver nor a fallback annotation or attribute driver could be found.");
224
+
}
225
+
214
226
thrownewRuntimeException("Failed to fallback to annotation driver: ({$driverClassName}), extension driver was not found.");
215
227
}
216
228
}
@@ -227,14 +239,20 @@ protected function getDriver($omDriver)
227
239
}
228
240
}
229
241
230
-
if ($driverinstanceof AttributeDriverInterface) {
231
-
if ($this->annotationReaderinstanceof AttributeReader) {
* Get the default annotation or attribute reader for extensions, creating it if necessary.
311
310
*
312
-
* @return Reader|AttributeReader
311
+
* If a reader cannot be created due to missing requirements, no default will be set as the reader is only required for annotation or attribute metadata,
312
+
* and the {@see ExtensionMetadataFactory} can handle raising an error if it tries to create a mapping driver that requires this reader.
thrownewRuntimeException(sprintf('Cannot create a default annotation reader in "%1$s". Ensure you are running PHP 8 to use attributes, have installed the "doctrine/annotations" package, or call "%1$s::setAnnotationReader()" with a configured reader.', self::class));
0 commit comments