src/base/Starter.php
private function requireAll()
    {
        $vendors = [];
        $plugins = $this->goals['plugins'];
        if ($plugins) {
            $file = File::create('.hidev/composer.json');
            $data = ArrayHelper::merge($file->load(), ['require' => $plugins]);
            if ($file->save($data) || !is_dir('.hidev/vendor')) {
                $this->updateDotHidev();
            }
            $vendors[] = $this->buildRootPath('.hidev/vendor');
        }
        if ($this->needsComposerInstall()) {
            if ($this->passthru('composer', ['install', '--ansi'])) {
                throw new InvalidParamException('Failed initialize project with composer install');
            }
        }
        $vendors[] = $this->buildRootPath('vendor');

        foreach ($vendors as $vendor) {
            foreach (['console', 'hidev'] as $name) {
                $path = ConfigPlugin::path($name, $vendor);
                if (file_exists($path)) {
                    $this->appFiles[] = $path;
                }
            }
        }
    }
private function requireAll()
    {
        $vendors = [];
        $plugins = $this->goals['plugins'];
        if ($plugins) {
            $file = File::create('.hidev/composer.json');
            $data = ArrayHelper::merge($file->load(), ['require' => $plugins]);
            if ($file->save($data) || !is_dir('.hidev/vendor')) {
                $this->updateDotHidev();
            }
            $vendors[] = $this->buildRootPath('.hidev/vendor');
        }
        if ($this->needsComposerInstall()) {
            if ($this->passthru('composer', ['install', '--ansi'])) {
                throw new InvalidParamException('Failed initialize project with composer install');
            }
        }
        $vendors[] = $this->buildRootPath('vendor');

        foreach ($vendors as $vendor) {
            foreach (['console', 'hidev'] as $name) {
                $path = ConfigPlugin::path($name, $vendor);
                if (file_exists($path)) {
                    $this->appFiles[] = $path;
                }
            }
        }
    }
private function requireAll ( ) { $ vendors = [ ] ; $ plugins = $ this -> goals [ 'plugins' ] ; if ( $ plugins ) { $ file = File :: create ( '.hidev/composer.json' ) ; $ data = ArrayHelper :: merge ( $ file -> load ( ) , [ 'require' => $ plugins ] ) ; if ( $ file -> save ( $ data ) || ! is_dir ( '.hidev/vendor' ) ) { $ this -> updateDotHidev ( ) ; } $ vendors [ ] = $ this -> buildRootPath ( '.hidev/vendor' ) ; } if ( $ this -> needsComposerInstall ( ) ) { if ( $ this -> passthru ( 'composer' , [ 'install' , '--ansi' ] ) ) { throw new InvalidParamException ( 'Failed initialize project with composer install' ) ; } } $ vendors [ ] = $ this -> buildRootPath ( 'vendor' ) ; foreach ( $ vendors as $ vendor ) { foreach ( [ 'console' , 'hidev' ] as $ name ) { $ path = ConfigPlugin :: path ( $ name , $ vendor ) ; if ( file_exists ( $ path ) ) { $ this -> appFiles [ ] = $ path ; } } } }
- install configured plugins and register their app config
- install project dependencies and register
- register application config files.
- install configured plugins and register their app config - install project dependencies and register - register application config files .