소스 검색

Clarify some error messages, fixes #3770

Jordi Boggiano 9 년 전
부모
커밋
f5e0fc14b3
3개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 1 1
      src/Composer/Command/DiagnoseCommand.php
  2. 1 1
      src/Composer/Command/ValidateCommand.php
  3. 1 1
      src/Composer/DependencyResolver/Problem.php

+ 1 - 1
src/Composer/Command/DiagnoseCommand.php

@@ -312,7 +312,7 @@ EOT
         $latest = trim($this->rfs->getContents('getcomposer.org', $protocol . '://getcomposer.org/version', false));
         $latest = trim($this->rfs->getContents('getcomposer.org', $protocol . '://getcomposer.org/version', false));
 
 
         if (Composer::VERSION !== $latest && Composer::VERSION !== '@package_version@') {
         if (Composer::VERSION !== $latest && Composer::VERSION !== '@package_version@') {
-            return '<comment>You are not running the latest version</comment>';
+            return '<comment>You are not running the latest version, run `composer self-update` to update</comment>';
         }
         }
 
 
         return true;
         return true;

+ 1 - 1
src/Composer/Command/ValidateCommand.php

@@ -89,7 +89,7 @@ EOT
         $composer = Factory::create($io, $file);
         $composer = Factory::create($io, $file);
         $locker = $composer->getLocker();
         $locker = $composer->getLocker();
         if ($locker->isLocked() && !$locker->isFresh()) {
         if ($locker->isLocked() && !$locker->isFresh()) {
-            $lockErrors[] = 'The lock file is not up to date with the latest changes in composer.json.';
+            $lockErrors[] = 'The lock file is not up to date with the latest changes in composer.json, it is recommended that you run `composer update`.';
         }
         }
 
 
         $this->outputResult($io, $file, $errors, $warnings, $checkPublish, $publishErrors, $checkLock, $lockErrors, true);
         $this->outputResult($io, $file, $errors, $warnings, $checkPublish, $publishErrors, $checkLock, $lockErrors, true);

+ 1 - 1
src/Composer/DependencyResolver/Problem.php

@@ -109,7 +109,7 @@ class Problem
                     $ext = substr($job['packageName'], 4);
                     $ext = substr($job['packageName'], 4);
                     $error = extension_loaded($ext) ? 'has the wrong version ('.(phpversion($ext) ?: '0').') installed' : 'is missing from your system';
                     $error = extension_loaded($ext) ? 'has the wrong version ('.(phpversion($ext) ?: '0').') installed' : 'is missing from your system';
 
 
-                    return "\n    - The requested PHP extension ".$job['packageName'].$this->constraintToText($job['constraint']).' '.$error.'.';
+                    return "\n    - The requested PHP extension ".$job['packageName'].$this->constraintToText($job['constraint']).' '.$error.'. Install or enable PHP\'s '.$ext.' extension.';
                 }
                 }
 
 
                 // handle linked libs
                 // handle linked libs