src/ACFProInstaller/Plugin.php
public function addKey(PreFileDownloadEvent $event)
    {
        $processedUrl = $event->getProcessedUrl();

        if ($this->isAcfProPackageUrl($processedUrl)) {
            $rfs = $event->getRemoteFilesystem();
            $acfRfs = new RemoteFilesystem(
                $this->addParameterToUrl(
                    $processedUrl,
                    'k',
                    $this->getKeyFromEnv()
                ),
                $this->io,
                $this->composer->getConfig(),
                $rfs->getOptions(),
                $rfs->isTlsDisabled()
            );
            $event->setRemoteFilesystem($acfRfs);
        }
    }
public function addKey(PreFileDownloadEvent $event)
    {
        $processedUrl = $event->getProcessedUrl();

        if ($this->isAcfProPackageUrl($processedUrl)) {
            $rfs = $event->getRemoteFilesystem();
            $acfRfs = new RemoteFilesystem(
                $this->addParameterToUrl(
                    $processedUrl,
                    'k',
                    $this->getKeyFromEnv()
                ),
                $this->io,
                $this->composer->getConfig(),
                $rfs->getOptions(),
                $rfs->isTlsDisabled()
            );
            $event->setRemoteFilesystem($acfRfs);
        }
    }
public function addKey ( PreFileDownloadEvent $ event ) { $ processedUrl = $ event -> getProcessedUrl ( ) ; if ( $ this -> isAcfProPackageUrl ( $ processedUrl ) ) { $ rfs = $ event -> getRemoteFilesystem ( ) ; $ acfRfs = new RemoteFilesystem ( $ this -> addParameterToUrl ( $ processedUrl , 'k' , $ this -> getKeyFromEnv ( ) ) , $ this -> io , $ this -> composer -> getConfig ( ) , $ rfs -> getOptions ( ) , $ rfs -> isTlsDisabled ( ) ) ; $ event -> setRemoteFilesystem ( $ acfRfs ) ; } }
Add the key from the environment to the event url

The key is not added to the package because it would show up in the
composer.lock file in this case. A custom file system is used to
swap out the ACF PRO url with a url that contains the key.

@access public
@param PreFileDownloadEvent $event The event that called this method
@throws MissingKeyException
Add the key from the environment to the event url