WordPress at a glance
function is not described


CakePHPInstaller::matchesCakeVersion() protected WC 1.0

Check if CakePHP version matches against a version

{} It's a method of the class: CakePHPInstaller{}

No Hooks.


true|false. Nothing.


// protected - for code of main (parent) or child class
$result = $this->matchesCakeVersion( $matcher, $version );
$matcher(string) (required)
$version(string) (required)

Code of CakePHPInstaller::matchesCakeVersion() WC 5.3.0

protected function matchesCakeVersion($matcher, $version)
    $repositoryManager = $this->composer->getRepositoryManager();
    if (! $repositoryManager) {
        return false;

    $repos = $repositoryManager->getLocalRepository();
    if (!$repos) {
        return false;

    return $repos->findPackage('cakephp/cakephp', new Constraint($matcher, $version)) !== null;