function UnpackManager::isDevRequirement
Checks if a package is a dev requirement.
Parameters
\Composer\Package\PackageInterface $package: The package to check.
Return value
bool TRUE if the package is present in require-dev or due to a package in require-dev, FALSE if not.
4 calls to UnpackManager::isDevRequirement()
- Plugin::unpackOnCreateProject in composer/
Plugin/ RecipeUnpack/ Plugin.php - Post create-project command event callback.
- Plugin::unpackOnRequire in composer/
Plugin/ RecipeUnpack/ Plugin.php - Post update command event callback.
- UnpackCommand::execute in composer/
Plugin/ RecipeUnpack/ UnpackCommand.php - Unpacker::updateComposerJsonPackages in composer/
Plugin/ RecipeUnpack/ Unpacker.php - Updates the composer.json content with the package being unpacked.
File
-
composer/
Plugin/ RecipeUnpack/ UnpackManager.php, line 92
Class
- UnpackManager
- Manages the recipe unpacking process.
Namespace
Drupal\Composer\Plugin\RecipeUnpackCode
public static function isDevRequirement(PackageInterface $package) : bool {
// Check if package is either a regular or dev requirement.
return InstalledVersions::isInstalled($package->getName()) && !InstalledVersions::isInstalled($package->getName(), FALSE);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.