ensureProjectBinDirInSystemPath() публичный статический Метод

To make sure this application works the same in CLI and Composer modus, we'll have to ensure that the bin path is always prefixed.
public static ensureProjectBinDirInSystemPath ( string $binDir )
$binDir string
Пример #1
0
 /**
  * @return Helper\ComposerHelper
  */
 protected function initializeComposerHelper()
 {
     if ($this->composerHelper) {
         return $this->composerHelper;
     }
     try {
         $composerFile = getcwd() . DIRECTORY_SEPARATOR . 'composer.json';
         $configuration = Composer::loadConfiguration();
         Composer::ensureProjectBinDirInSystemPath($configuration->get('bin-dir'));
         $rootPackage = Composer::loadRootPackageFromJson($composerFile, $configuration);
     } catch (RuntimeException $e) {
         $configuration = null;
         $rootPackage = null;
     }
     return $this->composerHelper = new Helper\ComposerHelper($configuration, $rootPackage);
 }