Symfony - (1/1) InvalidConfigurationException - "framework" 下无法识别的选项 "mailer"
Symfony - (1/1) InvalidConfigurationException - Unrecognized option "mailer" under "framework"
我是 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.
感谢您的帮助!
如果您正在启动另一个开发人员的项目,您可能不需要任何 composer require
。您所要做的就是在项目目录中 运行 composer install
获取所有相同的包,就像以前的开发人员一样。
我是 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.
感谢您的帮助!
如果您正在启动另一个开发人员的项目,您可能不需要任何 composer require
。您所要做的就是在项目目录中 运行 composer install
获取所有相同的包,就像以前的开发人员一样。