fix: prevent self-referencing composer dependency in enterprise package

ensureComposerEnterprise() now skips repos whose composer.json name
matches 'mokoconsulting-tech/enterprise' to avoid the package requiring
itself. Also removes the re-added self-reference from composer.json.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Jonathan Miller
2026-04-26 11:55:10 -05:00
parent 5c0cb98082
commit ff07d0a563
2 changed files with 5 additions and 1 deletions
-1
View File
@@ -17,7 +17,6 @@
"ext-json": "*",
"ext-zip": "*",
"guzzlehttp/guzzle": "^7.8",
"mokoconsulting-tech/enterprise": "dev-version/04",
"monolog/monolog": "^3.5",
"php": ">=8.1",
"phpseclib/phpseclib": "^3.0",
@@ -769,6 +769,11 @@ HCL;
return;
}
// Don't add self-referencing dependency — skip if this IS the enterprise package
if (($json['name'] ?? '') === 'mokoconsulting-tech/enterprise') {
return;
}
$expectedConstraint = 'dev-' . self::VERSION_BRANCH;
// Check if enterprise package is already required with correct constraint