- Issue created by @Codex42
After updating remote_stream_wrapper to version 2.1.1, the AvPortalPhotoStreamWrapper class throws fatal errors due to strict typing incompatibilities with the parent HttpStreamWrapper class.
media_avportal moduleremote_stream_wrapper to version 2.1.1 or laterdrush crError examples:
Fatal error: Type of Drupal\media_avportal\StreamWrapper\AvPortalPhotoStreamWrapper::$uri must be string (as in class Drupal\remote_stream_wrapper\StreamWrapper\HttpStreamWrapper) Fatal error: Declaration of Drupal\media_avportal\StreamWrapper\AvPortalPhotoStreamWrapper::unlink($path) must be compatible with Drupal\remote_stream_wrapper\StreamWrapper\HttpStreamWrapper::unlink($path): bool
Update AvPortalPhotoStreamWrapper to match the strict type declarations introduced in HttpStreamWrapper 2.1.1. The required changes include:
protected $uri; to protected string $uri;getName(): stringgetDescription(): stringgetType(): intsetUri($uri): voidgetUri(): stringgetExternalUrl(): stringrealpath(): string|boolpreventUnmanagedFileImageStyleGeneration(): boolunlink($path): boolreturn NULL; to return ''; in getExternalUrl() methodAttached patch provides these fixes and maintains backward compatibility while ensuring strict type compliance.
Active
1.11
Code