Composer- ошибка Fatal error: Call to undefined function Composer\Json\json decode() in phar

Материал из Wiki - Iphoster - the best ever hosting and support. 2005 - 2024
Перейти к:навигация, поиск

Composer- ошибка Fatal error: Call to undefined function Composer\Json\json decode() in phar

Ошибка вида:

$ /opt/alt/php56/usr/bin/php -d extension=phar.so /usr/local/bin/composer require mediawiki/chameleon-skin "1.*"
PHP Fatal error:  Call to undefined function Composer\Json\json_decode() in phar:///usr/local/bin/composer/src/Composer/Json/JsonFile.php on line 153
Fatal error: Call to undefined function Composer\Json\json_decode() in phar:///usr/local/bin/composer/src/Composer/Json/JsonFile.php on line 153


Решение - подключаем расширения php - phar и json через опцию "-d":

$ /opt/alt/php56/usr/bin/php -d extension=phar.so -d extension=json.so /usr/local/bin/composer require mediawiki/chameleon-skin "1.*"