public function freezePackage($packageKey)
    {
        if (!$this->bootstrap->getContext()->isDevelopment()) {
            throw new \LogicException('Package freezing is only supported in Development context.', 1338810870);
        }

        if (!$this->isPackageAvailable($packageKey)) {
            throw new Exception\UnknownPackageException('Package "' . $packageKey . '" is not available.', 1331715956);
        }
        if ($this->isPackageFrozen($packageKey)) {
            return;
        }

        $package = $this->packages[$packageKey];
        $this->bootstrap->getObjectManager()->get(ReflectionService::class)->freezePackageReflection($packageKey);

        $this->packageStatesConfiguration['packages'][$package->getComposerName()]['frozen'] = true;
        $this->savePackageStates($this->packageStatesConfiguration);
    }
public function freezePackage($packageKey)
    {
        if (!$this->bootstrap->getContext()->isDevelopment()) {
            throw new \LogicException('Package freezing is only supported in Development context.', 1338810870);
        }

        if (!$this->isPackageAvailable($packageKey)) {
            throw new Exception\UnknownPackageException('Package "' . $packageKey . '" is not available.', 1331715956);
        }
        if ($this->isPackageFrozen($packageKey)) {
            return;
        }

        $package = $this->packages[$packageKey];
        $this->bootstrap->getObjectManager()->get(ReflectionService::class)->freezePackageReflection($packageKey);

        $this->packageStatesConfiguration['packages'][$package->getComposerName()]['frozen'] = true;
        $this->savePackageStates($this->packageStatesConfiguration);
    }
public function freezePackage ( $ packageKey ) { if ( ! $ this -> bootstrap -> getContext ( ) -> isDevelopment ( ) ) { throw new \ LogicException ( 'Package freezing is only supported in Development context.' , 1338810870 ) ; } if ( ! $ this -> isPackageAvailable ( $ packageKey ) ) { throw new Exception \ UnknownPackageException ( 'Package "' . $ packageKey . '" is not available.' , 1331715956 ) ; } if ( $ this -> isPackageFrozen ( $ packageKey ) ) { return ; } $ package = $ this -> packages [ $ packageKey ] ; $ this -> bootstrap -> getObjectManager ( ) -> get ( ReflectionService :: class ) -> freezePackageReflection ( $ packageKey ) ; $ this -> packageStatesConfiguration [ 'packages' ] [ $ package -> getComposerName ( ) ] [ 'frozen' ] = true ; $ this -> savePackageStates ( $ this -> packageStatesConfiguration ) ; }
Freezes a package

@param string $packageKey The package to freeze
@return void
@throws \LogicException
@throws Exception\UnknownPackageException
Freezes a package