Skip to content

Commit f2070c2

Browse files
committed
Blocked more vendor names
1 parent 6fa027d commit f2070c2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Validator/ValidPackageRepositoryValidator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,15 +107,15 @@ public function validate(mixed $value, Constraint $constraint): void
107107
}
108108

109109
if (
110-
Preg::isMatchStrictGroups('{^([^/]*(symfony)[^/]*)/}', $name, $match)
110+
Preg::isMatchStrictGroups('{^([^/]*(symfony|packagist|composer)[^/]*)/}', $name, $match)
111111
&& !$this->packageRepository->isVendorTaken($match[1])
112112
) {
113113
$this->addViolation('The vendor name '.htmlentities($match[1], ENT_COMPAT, 'utf-8').' is blocked, if you think this is a mistake please get in touch with us.');
114114

115115
return;
116116
}
117117

118-
$reservedVendors = ['php', 'packagist'];
118+
$reservedVendors = ['php', 'packagist', 'api', 'sdk', 'auth', 'openai', 'annotation', 'authentication', 'authorization', 'dependency', 'dependencies', 'kernel', 'mcp', 'namespace', 'namespaces', 'rfc', 'routing', 'standards', 'standard', 'token'];
119119
$bits = explode('/', strtolower($name));
120120
if (in_array($bits[0], $reservedVendors, true)) {
121121
$this->addViolation('The vendor name '.htmlentities($bits[0], ENT_COMPAT, 'utf-8').' is reserved, please use another name or reach out to us if you have a legitimate use for it.');

0 commit comments

Comments
 (0)