I'm in the follwoing situation:
I want to deploy a php-app via "git push" on openshift. Dependencies are resolved via composer. The composer.lock file (locking the dependencies to the specific wanted version) is part of the repository.
Dependencies are loaded using the deploy
hook script using:
${PHP_DIR}/bin/php $OPENSHIFT_DATA_DIR/composer.phar update --prefer-dist --no-dev -n
${PHP_DIR}/bin/php $OPENSHIFT_DATA_DIR/composer.phar dump-autoload --optimize -n
One of the dependencies (htmlpurifier) is a dependency of a subdependency. During the second command (dump-autoload --optimize) an error complaining about a "Ambiguous class resolution"-warning is written to stderr(I suppose), causing the deploy to fail. Code is tested locally using unit/integration tests and proven to work, even with this erroneous package.
remote: Warning: Ambiguous class resolution, "HTML5" was found in both "/var/lib
/openshift/abc/app-root/runtime/repo/vendor/ezyang/htmlpuri
fier/maintenance/PH5P.php" and "/var/lib/openshift/abc/app-
root/runtime/repo/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Lexer/PH5P.php
", the first will be used.
Is their a way to ignore this specific warning (e.g. an undocumented option), without ignoring all other warnings and/or messages generated by the command? Or is it possible to exclude a specific subdependency from autoload optimization to avoid the warning and let deploy succeed without ignoring all possible errors?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…