This Google Cloud Storage adapter commit introduced a new constructor parameter ($mimeTypeDetector) leading to a dependency injection error.
Q
A
BC Break
yes
Version
4.4.1
Summary
Update league/flysystem-google-cloud-storage from 3.0.9 to 3.0.15 with oneup/flysystem-bundle4.4.1
Resulting error :
League\Flysystem\GoogleCloudStorage\GoogleCloudStorageAdapter::__construct(): Argument #5 ($mimeTypeDetector) must be of type ?League\MimeTypeDetection\MimeTypeDetector, string given, called in /app/var/cache/dev/ContainerAIbli
xC/srcApp_KernelDevDebugContainer.php on line 5387
How to reproduce
Without touching configuration, a working project does not work after update.
I managed to fix with this workaround in Kernel.php :
public function process(ContainerBuilder $container)
{
$container->getDefinition('oneup_flysystem.adapter.googlecloudstorage')->setArgument(4, null);
}
Bug Report
This Google Cloud Storage adapter commit introduced a new constructor parameter (
$mimeTypeDetector
) leading to a dependency injection error.Summary
Update
league/flysystem-google-cloud-storage
from3.0.9
to3.0.15
withoneup/flysystem-bundle
4.4.1
Resulting error :
How to reproduce
Without touching configuration, a working project does not work after update.
I managed to fix with this workaround in
Kernel.php
:This issue has also been posted in the flysystem repo