@ -336,6 +336,38 @@ class ValidatingArrayLoader implements LoaderInterface
return $this->errors;
}
public static function hasPackageNamingError($name, $isLink = false)
{
if (preg_match(PlatformRepository::PLATFORM_PACKAGE_REGEX, $name)) {
return;
}
if (!preg_match('{^[a-z0-9]([_.-]?[a-z0-9]+)*/[a-z0-9]([_.-]?[a-z0-9]+)*$}iD', $name)) {
return $name.' is invalid, it should have a vendor name, a forward slash, and a package name. The vendor and package name can be words separated by -, . or _. The complete name should match "[a-z0-9]([_.-]?[a-z0-9]+)*/[a-z0-9]([_.-]?[a-z0-9]+)*".';
@ -44,12 +44,12 @@ Your requirements could not be resolved to an installable set of packages.
Problem 1
- The requested package unstable/package 2.* exists as unstable/package[1.0.0] but these are rejected by your constraint.
Problem 2
- The requested package bogus could not be found in any version, there may be a typo in the package name.
- The requested package bogus/pkg could not be found in any version, there may be a typo in the package name.
Problem 3
- The requested package stable-requiree-excluded (installed at 1.0.0, required as 1.0.1) is satisfiable by stable-requiree-excluded[1.0.0] but these conflict with your requirements or minimum-stability.
- The requested package stable-requiree-excluded/pkg (installed at 1.0.0, required as 1.0.1) is satisfiable by stable-requiree-excluded/pkg[1.0.0] but these conflict with your requirements or minimum-stability.
Problem 4
- Installation request for requirer 1.* -> satisfiable by requirer[1.0.0].
- requirer 1.0.0 requires dependency 1.0.0 -> satisfiable by dependency[1.0.0] but these conflict with your requirements or minimum-stability.
- Installation request for requirer/pkg 1.* -> satisfiable by requirer/pkg[1.0.0].
- requirer/pkg 1.0.0 requires dependency/pkg 1.0.0 -> satisfiable by dependency/pkg[1.0.0] but these conflict with your requirements or minimum-stability.