public function onPreFileDownload(PreFileDownloadEvent $event)
    {
        $protocol = parse_url($event->getProcessedUrl(), PHP_URL_SCHEME);

        if ($protocol === 's3') {
            $s3RemoteFilesystem = new S3RemoteFilesystem(
                $this->io,
                $this->composer->getConfig(),
                $event->getRemoteFilesystem()->getOptions(),
                $this->getClient()
            );
            $event->setRemoteFilesystem($s3RemoteFilesystem);
        }
    }
public function onPreFileDownload(PreFileDownloadEvent $event)
    {
        $protocol = parse_url($event->getProcessedUrl(), PHP_URL_SCHEME);

        if ($protocol === 's3') {
            $s3RemoteFilesystem = new S3RemoteFilesystem(
                $this->io,
                $this->composer->getConfig(),
                $event->getRemoteFilesystem()->getOptions(),
                $this->getClient()
            );
            $event->setRemoteFilesystem($s3RemoteFilesystem);
        }
    }
public function onPreFileDownload ( PreFileDownloadEvent $ event ) { $ protocol = parse_url ( $ event -> getProcessedUrl ( ) , PHP_URL_SCHEME ) ; if ( $ protocol === 's3' ) { $ s3RemoteFilesystem = new S3RemoteFilesystem ( $ this -> io , $ this -> composer -> getConfig ( ) , $ event -> getRemoteFilesystem ( ) -> getOptions ( ) , $ this -> getClient ( ) ) ; $ event -> setRemoteFilesystem ( $ s3RemoteFilesystem ) ; } }
Replace remote file system on S3 protocol download

@param PreFileDownloadEvent $event
Replace remote file system on S3 protocol download