- Issue created by @harpade
- First commit to issue fork.
The MediaContextualCropService constructor expects an argument of type FileSystem, but when using the S3fs module, the injected service is S3fsFileSystem, causing a TypeError.
TypeError: Drupal\media_contextual_crop\MediaContextualCropService::__construct(): Argument #2 ($file_system) must be of type Drupal\Core\File\FileSystem, Drupal\s3fs\S3fsFileSystemD103 given, called in /web/core/lib/Drupal/Component/DependencyInjection/Container.php
Environment:
Drupal version: 11.x
PHP version: 8.3
Media Contextual Crop version: 2.1
S3fs version: 8.x-3.7
Proposed Fix:
The MediaContextualCropService should use FileSystemInterface instead of FileSystem in its constructor to ensure compatibility with custom file systems such as S3fs.
Active
2.1
Code