protected static function packageIsUnpinned(Link $package) {
    if ($package->getTarget() == 'drupal/core') {
      // Bail out if the patched package is drupal/core since we release with
      // each version of core and always ensure core patches still apply.
      return FALSE;
    }
    $constraint = $package->getPrettyConstraint();
    if (preg_match('/[\^~*|]/', $constraint)) {
      // If ^, ~, *, or | characters are being used, the dependency is not
      // pinned to a specific release.
      return TRUE;
    }
  }
protected static function packageIsUnpinned(Link $package) {
    if ($package->getTarget() == 'drupal/core') {
      // Bail out if the patched package is drupal/core since we release with
      // each version of core and always ensure core patches still apply.
      return FALSE;
    }
    $constraint = $package->getPrettyConstraint();
    if (preg_match('/[\^~*|]/', $constraint)) {
      // If ^, ~, *, or | characters are being used, the dependency is not
      // pinned to a specific release.
      return TRUE;
    }
  }
protected static function packageIsUnpinned ( Link $ package ) { if ( $ package -> getTarget ( ) == 'drupal/core' ) { // Bail out if the patched package is drupal/core since we release with // each version of core and always ensure core patches still apply. return FALSE ; } $ constraint = $ package -> getPrettyConstraint ( ) ; if ( preg_match ( '/[\^~*|]/' , $ constraint ) ) { // If ^, ~, *, or | characters are being used, the dependency is not // pinned to a specific release. return TRUE ; } }
Determines if a given package's constraint is pinned or not.

@param \Composer\Package\Link $package
The package to check.

@return bool
True if the constraint appears to be unpinned.
Determines if a given package s constraint is pinned or not .