public static function DrupalCoreComposer::createFromPath in Drupal 10
Same name and namespace in other branches
- 8 composer/Generator/Util/DrupalCoreComposer.php \Drupal\Composer\Generator\Util\DrupalCoreComposer::createFromPath()
- 9 composer/Generator/Util/DrupalCoreComposer.php \Drupal\Composer\Generator\Util\DrupalCoreComposer::createFromPath()
DrupalCoreComposer factory.
Parameters
string $repositoryPath: Path to a directory containing a composer.json and composer.lock files.
Return value
static New DrupalCoreComposer object containing composer.json and lock data.
2 calls to DrupalCoreComposer::createFromPath()
- MetapackageUpdateTest::testUpdated in core/
tests/ Drupal/ Tests/ Composer/ Generator/ MetapackageUpdateTest.php - Tests to see if the generated metapackages are in sync with composer.lock.
- PackageGenerator::generate in composer/
Generator/ PackageGenerator.php - Generate Drupal's metapackages whenever composer.lock is updated.
File
- composer/
Generator/ Util/ DrupalCoreComposer.php, line 49
Class
- DrupalCoreComposer
- Utilities for accessing composer.json data from drupal/drupal and drupal/core.
Namespace
Drupal\Composer\Generator\UtilCode
public static function createFromPath(string $repositoryPath) {
$composerJson = static::loadJsonFromPath("{$repositoryPath}/composer.json");
$composerLock = static::loadJsonFromPath("{$repositoryPath}/composer.lock");
return new self($composerJson, $composerLock);
}