简体   繁体   中英

Failed to install symfony/mailer because of friendsofsymfony/user-bundle

I have problem in using mailer in symfony. I want to follow the instruction on symfony website . When I write composer require symfony/mailer in the terminal, I get an error:

Using version ^2.1 for friendsofsymfony/user-bundle
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Restricting packages listed in "symfony/symfony" to "5.0.*"
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - friendsofsymfony/user-bundle v2.1.2 requires symfony/form ^2.8 || ^3.0 || ^4.0 -> no matching package found.
    - friendsofsymfony/user-bundle v2.1.1 requires symfony/form ^2.8 || ^3.0 || ^4.0 -> no matching package found.
    - friendsofsymfony/user-bundle v2.1.0 requires symfony/form ^2.8 || ^3.0 || ^4.0 -> no matching package found.
    - Installation request for friendsofsymfony/user-bundle ^2.1 -> satisfiable by friendsofsymfony/user-bundle[v2.1.0, v2.1.1, v2.1.2].

Potential causes:
 - A typo in the package name
 - The package is not available in a stable-enough version according to your minimum-stability setting
   see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.
 - It's a private package and you forgot to add a custom repository to find it

Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.

Installation failed, reverting ./composer.json to its original content.

when I check the symfony version in terminal:

Symfony CLI version v4.11.3 (c) 2017-2019 Symfony SAS
Symfony CLI helps developers manage projects, from local code to remote infrastructure

can you please help me to solve this problem?

I don't know about the symfony 4.11 version. The last version maintained by symfony is the 4.4. I think you should work on 4.4 version for more stability.

When you read docs, look at the version. Here there is no doc for symfony 4.11 So you're bundle will probably not work on your version.

On packagist you can see the bundle can work on 4.4 or 5 version. https://packagist.org/packages/symfony/mailer

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM