public static function checkUrlVersion(AssetTypeInterface $assetType, $dependency, $version, array &$vcsRepos, array $composer)
    {
        if (preg_match('/(\:\/\/)|\@/', $version)) {
            list($url, $version) = static::splitUrlVersion($version);

            if (!static::isUrlArchive($url) && static::hasUrlDependencySupported($url)) {
                $vcsRepos[] = array(
                    'type' => sprintf('%s-vcs', $assetType->getName()),
                    'url' => $url,
                    'name' => $assetType->formatComposerName($dependency),
                );
            } else {
                $dependency = static::getUrlFileDependencyName($assetType, $composer, $dependency);
                $vcsRepos[] = array(
                    'type' => 'package',
                    'package' => array(
                        'name' => $assetType->formatComposerName($dependency),
                        'type' => $assetType->getComposerType(),
                        'version' => static::getUrlFileDependencyVersion($assetType, $url, $version),
                        'dist' => array(
                            'url' => $url,
                            'type' => 'file',
                        ),
                    ),
                );
            }
        }

        return array($dependency, $version);
    }
public static function checkUrlVersion(AssetTypeInterface $assetType, $dependency, $version, array &$vcsRepos, array $composer)
    {
        if (preg_match('/(\:\/\/)|\@/', $version)) {
            list($url, $version) = static::splitUrlVersion($version);

            if (!static::isUrlArchive($url) && static::hasUrlDependencySupported($url)) {
                $vcsRepos[] = array(
                    'type' => sprintf('%s-vcs', $assetType->getName()),
                    'url' => $url,
                    'name' => $assetType->formatComposerName($dependency),
                );
            } else {
                $dependency = static::getUrlFileDependencyName($assetType, $composer, $dependency);
                $vcsRepos[] = array(
                    'type' => 'package',
                    'package' => array(
                        'name' => $assetType->formatComposerName($dependency),
                        'type' => $assetType->getComposerType(),
                        'version' => static::getUrlFileDependencyVersion($assetType, $url, $version),
                        'dist' => array(
                            'url' => $url,
                            'type' => 'file',
                        ),
                    ),
                );
            }
        }

        return array($dependency, $version);
    }
public static function checkUrlVersion ( AssetTypeInterface $ assetType , $ dependency , $ version , array & $ vcsRepos , array $ composer ) { if ( preg_match ( '/(\:\/\/)|\@/' , $ version ) ) { list ( $ url , $ version ) = static :: splitUrlVersion ( $ version ) ; if ( ! static :: isUrlArchive ( $ url ) && static :: hasUrlDependencySupported ( $ url ) ) { $ vcsRepos [ ] = array ( 'type' => sprintf ( '%s-vcs' , $ assetType -> getName ( ) ) , 'url' => $ url , 'name' => $ assetType -> formatComposerName ( $ dependency ) , ) ; } else { $ dependency = static :: getUrlFileDependencyName ( $ assetType , $ composer , $ dependency ) ; $ vcsRepos [ ] = array ( 'type' => 'package' , 'package' => array ( 'name' => $ assetType -> formatComposerName ( $ dependency ) , 'type' => $ assetType -> getComposerType ( ) , 'version' => static :: getUrlFileDependencyVersion ( $ assetType , $ url , $ version ) , 'dist' => array ( 'url' => $ url , 'type' => 'file' , ) , ) , ) ; } } return array ( $ dependency , $ version ) ; }
Checks if the version is a URL version.

@param AssetTypeInterface $assetType  The asset type
@param string             $dependency The dependency
@param string             $version    The version
@param array              $vcsRepos   The list of new vcs configs
@param array              $composer   The partial composer data

@return string[] The new dependency and the new version
Checks if the version is a URL version .