Ivanp
Ivanp

Reputation: 455

symfony FOS not installing

Trying to install symfony FOS Bundle gives me error :

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.3.10
    - 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.3.10
    - 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.3.10
    - don't install symfony/security-bundle v2.1.1|don't install symfony/symfony v3.3.10
    - don't install symfony/security-bundle v2.1.10|don't install symfony/symfony v3.3.10
    - don't install symfony/security-bundle v2.1.11|don't install symfony/symfony v3.3.10
    - don't install symfony/security-bundle v2.1.12|don't install symfony/symfony v3.3.10
    - don't install symfony/security-bundle v2.1.13|don't install symfony/symfony v3.3.10
    - don't install symfony/security-bundle v2.1.2|don't install symfony/symfony v3.3.10
    - don't install symfony/security-bundle v2.1.3|don't install symfony/symfony v3.3.10
    - don't install symfony/security-bundle v2.1.4|don't install symfony/symfony v3.3.10
    - don't install symfony/security-bundle v2.1.5|don't install symfony/symfony v3.3.10
    - don't install symfony/security-bundle v2.1.6|don't install symfony/symfony v3.3.10
    - don't install symfony/security-bundle v2.1.7|don't install symfony/symfony v3.3.10
    - don't install symfony/security-bundle v2.1.8|don't install symfony/symfony v3.3.10
    - don't install symfony/security-bundle v2.1.9|don't install symfony/symfony v3.3.10
    - Installation request for symfony/symfony (locked at v3.3.10, required as 3.3.*) -> satisfiable by symfony/symfony[v3.3.10].


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

So at first the error that it gave me was that my version of PHP(7.0.1) is too low for symfony 3.3 and it has to be atleast => 7.0.8 .

So I uninstalled xampp , but saved htdocs as backup , got 7.1.10 and tried again , this was the time when I noticed that one laravel project in netbeans started having an error and the symfony project too .

So I tried installing FOS , this error pops up now , updated my composer , because I thought it is from not updated version of composer , but it is not that obviously , because the error is the same .

I saw another post but it was not the same problem , so I thought of asking for help here , because I am new to this .

But I understood that my life will be easier if I have FOS Bundle , so I really want it to start .

So please help me , what should I do ? P.S. I have just cutted my htdocs folder from desktop and pasted it in xampp dir and replaced the elements .

This is my composer.json in the symfony project:

 {
    "name": "/docsite",
    "license": "proprietary",
    "type": "project",
    "autoload": {
        "psr-4": {
            "AppBundle\\": "src/AppBundle"
        },
        "classmap": [
            "app/AppKernel.php",
            "app/AppCache.php"
        ]
    },
    "autoload-dev": {
        "psr-4": {
            "Tests\\": "tests/"
        },
        "files": [
            "vendor/symfony/symfony/src/Symfony/Component/VarDumper/Resources/functions/dump.php"
        ]
    },
    "require": {
        "php": ">=5.5.9",
        "doctrine/doctrine-bundle": "^1.6",
        "doctrine/orm": "^2.5",
        "incenteev/composer-parameter-handler": "^2.0",
        "sensio/distribution-bundle": "^5.0.19",
        "sensio/framework-extra-bundle": "^3.0.2",
        "symfony/monolog-bundle": "^3.1.0",
        "symfony/polyfill-apcu": "^1.0",
        "symfony/swiftmailer-bundle": "^2.3.10",
        "symfony/symfony": "3.3.*",
        "twig/twig": "^1.0||^2.0"
    },
    "require-dev": {
        "sensio/generator-bundle": "^3.0",
        "symfony/phpunit-bridge": "^3.0"
    },
    "scripts": {
        "symfony-scripts": [
            "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget"
        ],
        "post-install-cmd": [
            "@symfony-scripts"
        ],
        "post-update-cmd": [
            "@symfony-scripts"
        ]
    },
    "config": {
        "sort-packages": true
    },
    "extra": {
        "symfony-app-dir": "app",
        "symfony-bin-dir": "bin",
        "symfony-var-dir": "var",
        "symfony-web-dir": "web",
        "symfony-tests-dir": "tests",
        "symfony-assets-install": "relative",
        "incenteev-parameters": {
            "file": "app/config/parameters.yml"
        },
        "branch-alias": null
    }
}

My php version :

php -v
PHP 7.1.10 (cli) (built: Sep 26 2017 20:07:27) ( ZTS MSVC14 (Visual C++ 2015) x86 )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies

And the last command :

echo %path%
C:\oraclexe\app\oracle\product\11.2.0\server\bin;;C:\ProgramData\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Users\Вълкови\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Git\cmd;C:\Program Files (x86)\GtkSharp\2.12\bin;C:\Program Files (x86)\Skype\Phone\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\Liquid Technologies\Liquid Studio 2017\XmlDataBinder15\Redist15\cpp\win32\bin;C:\Program Files\Liquid Technologies\Liquid Studio 2017\XmlDataBinder15\Redist15\cpp\win64\bin;C:\xampp\php;C:\ProgramData\ComposerSetup\bin;C:\Program Files\TortoiseGit\bin;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\QuickTime\QTSystem\;C:\Program Files\Common Files\Autodesk Shared\;C:\Program Files (x86)\Autodesk\Backburner\;C:\Users\Вълкови\AppData\Local\Microsoft\WindowsApps;C:\Users\Вълкови\AppData\Roaming\Composer\vendor\bin;C:\xampp\php\php.exe;

Upvotes: 1

Views: 151

Answers (1)

kunicmarko20
kunicmarko20

Reputation: 2180

The problem is FOSUser 1.3 does not work with Symfony 3.3, you have to use FOSUser 2.0 and install it like:

composer require friendsofsymfony/user-bundle "~2.0"

And that should fix your problem.

Upvotes: 2

Related Questions