src/ACFProInstaller/Plugin.php
public function addVersion(PackageEvent $event)
    {
        $package = $this->getPackageFromOperation($event->getOperation());

        if ($package->getName() === self::ACF_PRO_PACKAGE_NAME) {
            $version = $this->validateVersion($package->getPrettyVersion());
            $package->setDistUrl(
                $this->addParameterToUrl($package->getDistUrl(), 't', $version)
            );
        }
    }
public function addVersion(PackageEvent $event)
    {
        $package = $this->getPackageFromOperation($event->getOperation());

        if ($package->getName() === self::ACF_PRO_PACKAGE_NAME) {
            $version = $this->validateVersion($package->getPrettyVersion());
            $package->setDistUrl(
                $this->addParameterToUrl($package->getDistUrl(), 't', $version)
            );
        }
    }
public function addVersion ( PackageEvent $ event ) { $ package = $ this -> getPackageFromOperation ( $ event -> getOperation ( ) ) ; if ( $ package -> getName ( ) === self :: ACF_PRO_PACKAGE_NAME ) { $ version = $ this -> validateVersion ( $ package -> getPrettyVersion ( ) ) ; $ package -> setDistUrl ( $ this -> addParameterToUrl ( $ package -> getDistUrl ( ) , 't' , $ version ) ) ; } }
Add the version to the package url

The version needs to be added in the PRE_PACKAGE_INSTALL/UPDATE
event to make sure that different version save different urls
in composer.lock. Composer would load any available version from cache
although the version numbers might differ (because they have the same
url).

@access public
@param PackageEvent $event The event that called the method
@throws UnexpectedValueException
Add the version to the package url