src/Util/ComposerLoader.php
public function build()
    {
        $basePath = $this->getBasePath();
        $composerJson = file_get_contents($basePath . '/composer.json');
        $composerLock = file_get_contents($basePath . '/composer.lock');

        if (!$composerJson || !$composerLock) {
            throw new Exception('composer.json or composer.lock could not be found!');
        }

        $this->setJson(json_decode($composerJson));
        $this->setLock(json_decode($composerLock));

        $this->extend('onAfterBuild');
    }
public function build()
    {
        $basePath = $this->getBasePath();
        $composerJson = file_get_contents($basePath . '/composer.json');
        $composerLock = file_get_contents($basePath . '/composer.lock');

        if (!$composerJson || !$composerLock) {
            throw new Exception('composer.json or composer.lock could not be found!');
        }

        $this->setJson(json_decode($composerJson));
        $this->setLock(json_decode($composerLock));

        $this->extend('onAfterBuild');
    }
public function build ( ) { $ basePath = $ this -> getBasePath ( ) ; $ composerJson = file_get_contents ( $ basePath . '/composer.json' ) ; $ composerLock = file_get_contents ( $ basePath . '/composer.lock' ) ; if ( ! $ composerJson || ! $ composerLock ) { throw new Exception ( 'composer.json or composer.lock could not be found!' ) ; } $ this -> setJson ( json_decode ( $ composerJson ) ) ; $ this -> setLock ( json_decode ( $ composerLock ) ) ; $ this -> extend ( 'onAfterBuild' ) ; }
Load and build the composer.json and composer.lock files

@return $this
@throws Exception If either file could not be loaded
Load and build the composer . json and composer . lock files