首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >作曲家崩溃

作曲家崩溃
EN

Server Fault用户
提问于 2020-01-09 00:02:44
回答 1查看 791关注 0票数 1

当我运行composer update时,会得到以下错误:

代码语言:javascript
复制
PHP Fatal error:  Uncaught TypeError: Argument 1 passed to Symfony\Component\Console\Question\Question::__construct() must be of the type string, array given, called in /usr/share/php/Composer/IO/ConsoleIO.php on line 239 and defined in /usr/share/php/Symfony/Component/Console/Question/Question.php:37
Stack trace:
#0 /usr/share/php/Composer/IO/ConsoleIO.php(239): Symfony\Component\Console\Question\Question->__construct(Array, 0)
#1 /var/www/html/vendor/zendframework/zend-component-installer/src/ComponentInstaller.php(434): Composer\IO\ConsoleIO->ask(Array, 0)
#2 /var/www/html/vendor/zendframework/zend-component-installer/src/ComponentInstaller.php(195): Zend\ComponentInstaller\ComponentInstaller->promptForConfigOption('Zend\\Navigation', Object(Zend\ComponentInstaller\Collection), 1)
#3 /var/www/html/vendor/zendframework/zend-component-installer/src/Collection.php(92): Zend\ComponentInstaller\ComponentInstaller->Zend\ComponentInstaller\{closure}(Object(Zend\ComponentInstaller\Collection), 'Zend\\N in /usr/share/php/Symfony/Component/Console/Question/Question.php on line 37

Fatal error: Uncaught TypeError: Argument 1 passed to Symfony\Component\Console\Question\Question::__construct() must be of the type string, array given, called in /usr/share/php/Composer/IO/ConsoleIO.php on line 239 and defined in /usr/share/php/Symfony/Component/Console/Question/Question.php:37
Stack trace:
#0 /usr/share/php/Composer/IO/ConsoleIO.php(239): Symfony\Component\Console\Question\Question->__construct(Array, 0)
#1 /var/www/html/vendor/zendframework/zend-component-installer/src/ComponentInstaller.php(434): Composer\IO\ConsoleIO->ask(Array, 0)
#2 /var/www/html/vendor/zendframework/zend-component-installer/src/ComponentInstaller.php(195): Zend\ComponentInstaller\ComponentInstaller->promptForConfigOption('Zend\\Navigation', Object(Zend\ComponentInstaller\Collection), 1)
#3 /var/www/html/vendor/zendframework/zend-component-installer/src/Collection.php(92): Zend\ComponentInstaller\ComponentInstaller->Zend\ComponentInstaller\{closure}(Object(Zend\ComponentInstaller\Collection), 'Zend\\N in /usr/share/php/Symfony/Component/Console/Question/Question.php on line 37

但不是在我所有的项目上。

在失败的项目上,我在composer.json文件中得到了以下要求。

代码语言:javascript
复制
"require": {
    "php": "^5.6 || ^7.0",
    "ext-gd": "*",
    "ext-intl": "*",
    "zendframework/zend-component-installer": "^1.0 || ^0.3 || ^1.0.0-dev@dev",
    "zendframework/zend-mvc": "^3.1",
    "zfcampus/zf-development-mode": "^3.0",
    "zendframework/zend-mvc-form": "^1.0",
    "zendframework/zend-mvc-plugins": "^1.0.1",
    "zendframework/zend-session": "^2.7.1",
    "zendframework/zend-authentication": "^2.5",
    "doctrine/doctrine-orm-module": "^1.1.5",
    "doctrine/migrations": "^1.5",
    "zendframework/zend-math": "^3.0",
    "zendframework/zend-crypt": "^3.1",
    "zendframework/zend-captcha": "^2.6",
    "zendframework/zend-mail": "^2.10",
    "zendframework/zend-mime": "^2.7",
    "symfony/polyfill-iconv": "^1.13"
},

如何更新/安装我的网站?

PHP 7.3.12-1

作曲家1.9.1 2019-11-01 17:20:17

EN

回答 1

Server Fault用户

回答已采纳

发布于 2020-01-09 14:46:52

谢谢你的提示。

我使用了zendframework/zend组件安装程序的旧版本。

我更改为"zendframework/zend-component-installer": "^2.1.2",,然后更新了composer:composer update zendframework/zend-component-installer,最后我能够更新所有内容:composer update

票数 0
EN
页面原文内容由Server Fault提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://serverfault.com/questions/998204

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档