Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. GitBitbucketDriver.php

function GitBitbucketDriver::supports

@inheritDoc

Overrides VcsDriverInterface::supports

File

vendor/composer/composer/src/Composer/Repository/Vcs/GitBitbucketDriver.php, line 508

Class

GitBitbucketDriver
@author Per Bernhardt <plb@webfactory.de>

Namespace

Composer\Repository\Vcs

Code

public static function supports(IOInterface $io, Config $config, string $url, bool $deep = false) : bool {
    if (!Preg::isMatch('#^https?://bitbucket\\.org/([^/]+)/([^/]+?)(\\.git|/?)?$#i', $url)) {
        return false;
    }
    if (!extension_loaded('openssl')) {
        $io->writeError('Skipping Bitbucket git driver for ' . $url . ' because the OpenSSL PHP extension is missing.', true, IOInterface::VERBOSE);
        return false;
    }
    return true;
}
RSS feed
Powered by Drupal