diff --git a/bin/compile b/bin/compile old mode 100755 new mode 100644 diff --git a/bin/composer b/bin/composer old mode 100755 new mode 100644 diff --git a/src/Composer/Command/DependsCommand.php b/src/Composer/Command/DependsCommand.php index 9079e46af..aa720adaa 100644 --- a/src/Composer/Command/DependsCommand.php +++ b/src/Composer/Command/DependsCommand.php @@ -63,7 +63,6 @@ EOT $needle = $input->getArgument('package'); $references = array(); - $recommendedDependencies = array(); // check if we have a local installation so we can grab the right package/version $repos = array_merge( diff --git a/src/Composer/Command/UpdateCommand.php b/src/Composer/Command/UpdateCommand.php index 4384b955f..6b46199c0 100644 --- a/src/Composer/Command/UpdateCommand.php +++ b/src/Composer/Command/UpdateCommand.php @@ -53,9 +53,8 @@ EOT protected function execute(InputInterface $input, OutputInterface $output) { - $composer = $this->getComposer(); - $installCommand = $this->getApplication()->find('install'); + return $installCommand->install($input, $output, true); } } diff --git a/src/Composer/DependencyResolver/Solver.php b/src/Composer/DependencyResolver/Solver.php index cc1ec4e92..2b6498965 100644 --- a/src/Composer/DependencyResolver/Solver.php +++ b/src/Composer/DependencyResolver/Solver.php @@ -1078,9 +1078,7 @@ class Solver protected function createTransaction() { $transaction = array(); - $installMeansUpdateMap = array(); - $ignoreRemoveMap = array(); foreach ($this->decisionQueue as $i => $literal) { $package = $literal->getPackage(); @@ -1739,7 +1737,7 @@ class Solver $level = 1; $systemLevel = $level + 1; - $minimizationsteps = 0; + $minimizationSteps = 0; $installedPos = 0; $this->installedPackages = $this->installed->getPackages(); @@ -1930,7 +1928,7 @@ class Solver $installedPos = 0; } - $systemlevel = $level + 1; + $systemLevel = $level + 1; if ($pass < 2) { // had trouble => retry diff --git a/src/Composer/Package/Loader/RootPackageLoader.php b/src/Composer/Package/Loader/RootPackageLoader.php index 1ce78cc82..294dd3f42 100644 --- a/src/Composer/Package/Loader/RootPackageLoader.php +++ b/src/Composer/Package/Loader/RootPackageLoader.php @@ -44,7 +44,6 @@ class RootPackageLoader extends ArrayLoader $package = parent::load($config); if (isset($config['repositories'])) { - $repositories = array(); foreach ($config['repositories'] as $repoName => $repo) { if (false === $repo && 'packagist' === $repoName) { continue; diff --git a/src/Composer/Package/Version/VersionParser.php b/src/Composer/Package/Version/VersionParser.php index e5006d824..7bd941d93 100644 --- a/src/Composer/Package/Version/VersionParser.php +++ b/src/Composer/Package/Version/VersionParser.php @@ -112,7 +112,7 @@ class VersionParser if (count($constraints) > 1) { $constraintObjects = array(); - foreach ($constraints as $key => $constraint) { + foreach ($constraints as $constraint) { $constraintObjects = array_merge($constraintObjects, $this->parseConstraint($constraint)); } } else { diff --git a/src/Composer/Repository/PearRepository.php b/src/Composer/Repository/PearRepository.php index b19620b3a..0e00a39c7 100644 --- a/src/Composer/Repository/PearRepository.php +++ b/src/Composer/Repository/PearRepository.php @@ -102,7 +102,6 @@ class PearRepository extends ArrayRepository } $deps = unserialize($deps); if (isset($deps['required']['package'])) { - $requires = array(); if (isset($deps['required']['package']['name'])) { $deps['required']['package'] = array($deps['required']['package']); diff --git a/src/Composer/Repository/Vcs/GitBitbucketDriver.php b/src/Composer/Repository/Vcs/GitBitbucketDriver.php index 01e90bc89..7718fcaa8 100644 --- a/src/Composer/Repository/Vcs/GitBitbucketDriver.php +++ b/src/Composer/Repository/Vcs/GitBitbucketDriver.php @@ -160,6 +160,6 @@ class GitBitbucketDriver extends VcsDriver implements VcsDriverInterface */ public static function supports($url, $deep = false) { - return preg_match('#^https://bitbucket\.org/([^/]+)/(.+?)\.git$#', $url, $match); + return preg_match('#^https://bitbucket\.org/([^/]+)/(.+?)\.git$#', $url); } } diff --git a/src/Composer/Repository/Vcs/GitHubDriver.php b/src/Composer/Repository/Vcs/GitHubDriver.php index 35f1f2737..9954f72c0 100644 --- a/src/Composer/Repository/Vcs/GitHubDriver.php +++ b/src/Composer/Repository/Vcs/GitHubDriver.php @@ -150,6 +150,6 @@ class GitHubDriver extends VcsDriver implements VcsDriverInterface */ public static function supports($url, $deep = false) { - return extension_loaded('openssl') && preg_match('#^(?:https?|git)://github\.com/([^/]+)/(.+?)(?:\.git)?$#', $url, $match); + return extension_loaded('openssl') && preg_match('#^(?:https?|git)://github\.com/([^/]+)/(.+?)(?:\.git)?$#', $url); } } diff --git a/src/Composer/Repository/Vcs/HgBitbucketDriver.php b/src/Composer/Repository/Vcs/HgBitbucketDriver.php index 2b7908c37..1105804f2 100644 --- a/src/Composer/Repository/Vcs/HgBitbucketDriver.php +++ b/src/Composer/Repository/Vcs/HgBitbucketDriver.php @@ -160,6 +160,6 @@ class HgBitbucketDriver extends VcsDriver implements VcsDriverInterface */ public static function supports($url, $deep = false) { - return preg_match('#^(?:https?|http)://bitbucket\.org/([^/]+)/([^/]+)/?$#', $url, $match); + return preg_match('#^https://bitbucket\.org/([^/]+)/([^/]+)/?$#', $url); } } diff --git a/src/Composer/Repository/VcsRepository.php b/src/Composer/Repository/VcsRepository.php index b1f43a28c..075a713b9 100644 --- a/src/Composer/Repository/VcsRepository.php +++ b/src/Composer/Repository/VcsRepository.php @@ -74,7 +74,6 @@ class VcsRepository extends ArrayRepository $versionParser = new VersionParser; $loader = new ArrayLoader(); - $versions = array(); if ($driver->hasComposerFile($driver->getRootIdentifier())) { $data = $driver->getComposerInformation($driver->getRootIdentifier());