1
0
Fork 0
mirror of https://github.com/composer/composer synced 2025-05-10 17:12:51 +00:00

Changed all substr calls used to compare fragments of text to strpos

Some additional code cleanups in those classes

Reverted change causing issues
This commit is contained in:
Simon Berger 2020-09-07 20:06:55 +02:00
parent 8694077564
commit bae227ec2d
23 changed files with 57 additions and 66 deletions

View file

@ -20,8 +20,6 @@ use Composer\Package\Version\StabilityFilter;
use Composer\Json\JsonFile;
use Composer\Cache;
use Composer\Config;
use Composer\Composer;
use Composer\Factory;
use Composer\IO\IOInterface;
use Composer\Semver\CompilingMatcher;
use Composer\Util\HttpDownloader;
@ -36,7 +34,6 @@ use Composer\Semver\Constraint\MatchAllConstraint;
use Composer\Util\Http\Response;
use Composer\Util\MetadataMinifier;
use Composer\Util\Url;
use React\Promise\Promise;
/**
* @author Jordi Boggiano <j.boggiano@seld.be>
@ -815,7 +812,7 @@ class ComposerRepository extends ArrayRepository implements ConfigurableReposito
return $this->rootData;
}
if (!extension_loaded('openssl') && 'https' === substr($this->url, 0, 5)) {
if (!extension_loaded('openssl') && strpos($this->url, 'https') === 0) {
throw new \RuntimeException('You must enable the openssl extension in your php.ini to load information from '.$this->url);
}