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

Breadcrumb

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

function CakePHPInstaller::matchesCakeVersion

Check if CakePHP version matches against a version

@phpstan-param '='|'=='|'<'|'<='|'>'|'>='|'<>'|'!=' $matcher

2 calls to CakePHPInstaller::matchesCakeVersion()
CakePHPInstaller::getLocations in vendor/composer/installers/src/Composer/Installers/CakePHPInstaller.php
Change the default plugin location when cakephp >= 3.0
CakePHPInstaller::inflectPackageVars in vendor/composer/installers/src/Composer/Installers/CakePHPInstaller.php
Format package name to CamelCase

File

vendor/composer/installers/src/Composer/Installers/CakePHPInstaller.php, line 51

Class

CakePHPInstaller

Namespace

Composer\Installers

Code

protected function matchesCakeVersion(string $matcher, string $version) : bool {
    $repositoryManager = $this->composer
        ->getRepositoryManager();
    
    /** @phpstan-ignore-next-line */
    if (!$repositoryManager) {
        return false;
    }
    $repos = $repositoryManager->getLocalRepository();
    
    /** @phpstan-ignore-next-line */
    if (!$repos) {
        return false;
    }
    return $repos->findPackage('cakephp/cakephp', new Constraint($matcher, $version)) !== null;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal