Dummy Module
This module replaces the class
\Magento\Framework\Filesystem\Driver\File
to provide a correct implementation
for the getRelativePath method., (*1)
You only need this module if you plan on having magento module sources outside of the Magento root., (*2)
The overwrite can be found in \Mwltr\FilesystemFileDriver\Filesystem\FileDriver
., (*3)
The actual implementation of the relative path caclulation can be found in
\Mwltr\FilesystemFileDriver\Helper\RelativePathHelper
., (*4)
To exchange the \Magento\Framework\Filesystem\Driver\File
an di.xml defintion won't work,
since the DriverPool is defined in \Magento\Framework\App\Bootstrap::createFilesystemDriverPool
., (*5)
There is a way to add additional parameters to the DriverPool, by setting an array field with key
Magento\Framework\App\Bootstrap::INIT_PARAM_FILESYSTEM_DRIVERS
in the $_SERVER
., (*6)
This module does that in the registration.php, since the registration.php is included during the whole composer autoload inclusion., (*7)
php
$_SERVER[\Magento\Framework\App\Bootstrap::INIT_PARAM_FILESYSTEM_DRIVERS] = [
'file' => \Mwltr\FilesystemFileDriver\Filesystem\FileDriver::class,
];
, (*8)