public function isPackageDependOn($packageNameA, $packageNameB)
    {
        $composerPackageA = $this->findPackageGlobal($packageNameA);

        if (is_null($composerPackageA) === true) {
            throw new \RuntimeException(sprintf('The package: "%s" does not exist.', $packageNameA));
        }

        $requires = $composerPackageA->getRequires();
        $pairPackageB = new PackageNameVersion($packageNameB);

        foreach ($requires as $link) {
            if ($link->getTarget() == $pairPackageB->getName()) {
                if ($link->getConstraint()->matches($pairPackageB->getComposerVersionConstraint())) {
                    return true;
                }

                return false;
            }
        }

        return false;
    }