【发布时间】:2021-05-03 05:02:39
【问题描述】:
我是 Symfony 的新手,在尝试在本地运行项目时,我在实习期间遇到了这个问题:
(1/1) InvalidConfigurationException
In ArrayNode.php line 331:
Unrecognized option "mailer" under "framework". Available options are "annotations", "assets", "cache", [...], "workflows".
我正在运行 PHP 7.4 和 Symfony 4,从另一个开发者那里改编了一个 symfony 项目。
在我的 .env 文件中,我得到了 swiftmailer 包,我相信 mailer 是另一种使用的邮件包..?
我尝试了以下请求:
composer require symfony/mailer
得到了这个:
The "symfony/flex" plugin was skipped because it is not compatible with Composer 2+. Make sure to update it to version 1.9.8 or greater.
Using version ^5.2 for symfony/mailer
./composer.json has been updated
The "symfony/flex" plugin was skipped because it is not compatible with Composer 2+. Make sure to update it to version 1.9.8 or greater.
Running composer update symfony/mailer
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- symfony/mailer[v5.2.0, ..., v5.2.2] require symfony/event-dispatcher ^4.4|^5.0 -> found symfony/event-dispatcher[v4.4.0, ..., v4.4.19, v5.0.0, ..., v5.2.2] but the package is fixed to v4.2.8 (lock file version) by a partial up
date and that version does not match. Make sure you list it as an argument for the update command.
- Root composer.json requires symfony/mailer ^5.2 -> satisfiable by symfony/mailer[v5.2.0, v5.2.1, v5.2.2].
Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
感谢您的帮助!
【问题讨论】:
标签: php symfony frameworks mailer