public function ComposerDeployHandler::__construct in Composer Deploy 7
Same name and namespace in other branches
- 8 src/ComposerDeployHandler.php \Drupal\composer_deploy\ComposerDeployHandler::__construct()
File
- includes/
ComposerDeployHandler.php, line 14 - Contains \Drupal\composer_deploy\ComposerDeployHandler.
Class
Namespace
Drupal\composer_deployCode
public function __construct($path) {
$packages = json_decode(file_get_contents($path), TRUE);
// Composer 2.0 compatibility.
// @see https://getcomposer.org/upgrade/UPGRADE-2.0.md
$packages = $packages['packages'] ?? $packages;
$this->packages = is_array($packages) ? $packages : [];
}