deployphp/recipes

New cachetool release (5.X) breaks cachetool recipe expectations for PHP 7.1

Closed this issue · 0 comments

Q A
Issue Type Bug
Deployer Version 6.7.0
Recipes Version 6.2.2
Local Machine OS Ubuntu 18.04.4 LTS (Linux deathstart 5.3.0-42-generic #34~18.04.1-Ubuntu SMP Fri Feb 28 13:42:26 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux)
Remote Machine OS CentOS Linux release 7.7.1908 (Core)

Description

After the release of the 5.X family of cachetool, cachetool.phar no longer refers to a member of 4.X family, but to the last tag of the new family instead. This introduces an error when cachetool is executed from an environment with PHP 7.1.X, as the new cachetool.phar works with PHP >=7.2.

Please note that I have a PR ready #256 for this issue, in case you'd like to accept it.

Steps to reproduce

In an environment with PHP 7.1, invoke the cachetool.phar installed by this recipe. You'll have the following error, as cachetool.phar is now intended for PHP >=7.2

Content of deploy.php

Anything that uses cachetool under the circumstances describe above. E.g.

task('deploy', [
    'cachetool:clear:opcache'
]);

Output log

$ php71 /var/www/[...]/cachetool.phar --version
PHP Fatal error:  Uncaught Error: Call to undefined function Symfony\Component\Console\Output\stream_isatty() in phar:///var/www/[...]/cachetool.phar/vendor/symfony/console/Output/StreamOutput.php:117
Stack trace:
#0 phar:///var/www/[...]/cachetool.phar/vendor/symfony/console/Output/StreamOutput.php(52): Symfony\Component\Console\Output\StreamOutput->hasColorSupport()
#1 phar:///var/www/[...]/cachetool.phar/vendor/symfony/console/Output/ConsoleOutput.php(42): Symfony\Component\Console\Output\StreamOutput->__construct(Resource id #71, 32, NULL, NULL)
#2 phar:///var/www/[...]/cachetool.phar/vendor/symfony/console/Application.php(118): Symfony\Component\Console\Output\ConsoleOutput->__construct()
#3 phar:///var/www/[...]/ in phar:///var/www/[...]/cachetool.phar/vendor/symfony/console/Output/StreamOutput.php on line 117