Repository navigation
🐛 fix(deploy): invoque composer via PHP CLI explicite dans deploy-nightly.sh - #560
Merged
Merged
Conversation
…htly.sh Sous le PATH minimal du cron cPanel, le shebang `#!/usr/bin/env php` de composer résolvait vers le PHP CGI (/usr/bin/php) plutôt que le CLI (/usr/local/bin/php) — composer install "réussissait" en apparence mais laissait vendor/ incomplet, cassant cache:clear juste après (6 instances en échec la nuit du 2026-10-02, symfony/monolog-bundle absent du vendor malgré composer.lock à jour).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Résumé
Déploiement nocturne cassé sur 6 instances (yannick, coralie, elea, corentin, damien, baptiste) la nuit du 2026-10-02 —
cache:clearéchouait avecClassNotFoundError: MonologBundle.Cause racine (diagnostic SSH sur yannick) :
composer.lock/composer.jsonétaient bien à jour, maisvendor/symfony/monolog-bundleétait absent./usr/local/bin/composera un shebang#!/usr/bin/env php— sous le PATH minimal du cron cPanel,envrésoutphpvers/usr/bin/php(CGI) plutôt que/usr/local/bin/php(CLI), que$PHP_BINutilise explicitement ailleurs dans le script.composer install"réussissait" en apparence (log :Warning: Composer should be invoked via the CLI version of PHP, not the cgi-fcgi SAPI) mais laissait le vendor incomplet.bin/deploy-nightly.sh:COMPOSER_BINinvoque désormaiscomposer.pharexplicitement via$PHP_BIN, court-circuitant le shebang.Test plan
env -i PATH=/usr/bin:/bin) : confirméenv php→ CGI$PHP_BIN /usr/local/bin/composer --versionsous ce même PATH minimal retourne bien PHP CLIbash -n: syntaxe du script validebin/deploy-all.shnon concerné (SSH interactif, PATH complet) — pas de changement nécessaireCloses #559