You are here

protected function ExtraPackage::loadPackage in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/wikimedia/composer-merge-plugin/src/Merge/ExtraPackage.php \Wikimedia\Composer\Merge\ExtraPackage::loadPackage()

Return value

CompletePackage

1 call to ExtraPackage::loadPackage()
ExtraPackage::__construct in vendor/wikimedia/composer-merge-plugin/src/Merge/ExtraPackage.php

File

vendor/wikimedia/composer-merge-plugin/src/Merge/ExtraPackage.php, line 125

Class

ExtraPackage
Processing for a composer.json file that will be merged into a RootPackageInterface

Namespace

Wikimedia\Composer\Merge

Code

protected function loadPackage($json) {
  $loader = new ArrayLoader();
  $package = $loader
    ->load($json);

  // @codeCoverageIgnoreStart
  if (!$package instanceof CompletePackage) {
    throw new UnexpectedValueException('Expected instance of CompletePackage, got ' . get_class($package));
  }

  // @codeCoverageIgnoreEnd
  return $package;
}