private static function getProjectActivation(PackageInterface $package, array $configPackages)
    {
        $name = $package->getName();
        $value = null;

        foreach ($configPackages as $pattern => $activation) {
            if (\is_int($pattern) && \is_string($activation)) {
                $pattern = $activation;
                $activation = true;
            }

            if ((0 === strpos($pattern, '/') && preg_match($pattern, $name)) || fnmatch($pattern, $name)) {
                $value = $activation;

                break;
            }
        }

        return $value;
    }