J'ai voulu installer le Bundle FOSUserBundle, et j'ai un message d'erreur.
Installation failed, reverting ./composer.json to its original content.
Je pense que c'est une question de compatibilité de version. Auriez-vous une solution?

J'ai tout mis à jour avant de vouloir installer ce Bundle.

C:\wamp64\www\sport>composer require friendsofsymfony/user-bundle "~1.3"
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Conclusion: don't install friendsofsymfony/user-bundle v1.3.7
    - Conclusion: don't install friendsofsymfony/user-bundle v1.3.6
    - Conclusion: don't install friendsofsymfony/user-bundle v1.3.5
    - Conclusion: don't install friendsofsymfony/user-bundle v1.3.4
    - Conclusion: don't install friendsofsymfony/user-bundle v1.3.3
    - Conclusion: don't install friendsofsymfony/user-bundle v1.3.2
    - Conclusion: don't install friendsofsymfony/user-bundle v1.3.1
    - Conclusion: remove symfony/symfony v3.2.9
    - Installation request for friendsofsymfony/user-bundle ~1.3 -> satisfiable by friendsofsymfony/user-bundle[v1.3.0, v1.3.1, v1.3.2, v1.3.3, v1.3.4, v1.3.5, v1.3.6, v1.3.7].
    - Conclusion: don't install symfony/symfony v3.2.9
    - friendsofsymfony/user-bundle v1.3.0 requires symfony/security-bundle 2.1.* -> satisfiable by symfony/security-bundle[v2.1.0, v2.1.1, v2.1.10, v2.1.11, v2.1.12, v2.1.13, v2.1.2, v2.1.3, v2.1.4, v2.1.5, v2.1.6, v2.1.7, v2.1.8, v2.1.9].
    - don't install symfony/security-bundle v2.1.0|don't install symfony/symfony v3.2.9
    - don't install symfony/security-bundle v2.1.1|don't install symfony/symfony v3.2.9
    - don't install symfony/security-bundle v2.1.10|don't install symfony/symfony v3.2.9
    - don't install symfony/security-bundle v2.1.11|don't install symfony/symfony v3.2.9
    - don't install symfony/security-bundle v2.1.12|don't install symfony/symfony v3.2.9
    - don't install symfony/security-bundle v2.1.13|don't install symfony/symfony v3.2.9
    - don't install symfony/security-bundle v2.1.2|don't install symfony/symfony v3.2.9
    - don't install symfony/security-bundle v2.1.3|don't install symfony/symfony v3.2.9
    - don't install symfony/security-bundle v2.1.4|don't install symfony/symfony v3.2.9
    - don't install symfony/security-bundle v2.1.5|don't install symfony/symfony v3.2.9
    - don't install symfony/security-bundle v2.1.6|don't install symfony/symfony v3.2.9
    - don't install symfony/security-bundle v2.1.7|don't install symfony/symfony v3.2.9
    - don't install symfony/security-bundle v2.1.8|don't install symfony/symfony v3.2.9
    - don't install symfony/security-bundle v2.1.9|don't install symfony/symfony v3.2.9
    - Installation request for symfony/symfony (locked at v3.2.9, required as 3.2.*) -> satisfiable by symfony/symfony[v3.2.9].

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

4 réponses


bkk0
Réponse acceptée

En effet comme le précise la doc : "For Symfony 3.0+ please use upcoming 2.0 release. If you are using Symfony 2.0.x, please use the 1.2.x releases of the bundle."
Donc pour installer FOS sur Symfony tu fais :

composer require friendsofsymfony/user-bundle "~2.0"

J'ai l'impression que fos n'est pas compatible avec symfony 3. Moi aussi j'ai laissé tombé.

bonsoir l'utilisant actuellement sur l'un de mes projet sur Symfony 3 je n'ai eu aucun problème.

dans mon comoser.json j'y ai ajouté cette ligne:

"friendsofsymfony/user-bundle": "~2.0",

Je pense qu'il faut utiliser cette ligne de code avec la version 2 au lieu de la version 1.3 comme sur la doc.
composer require friendsofsymfony/user-bundle "~2"

http://symfony.com/doc/current/bundles/FOSUserBundle/index.html