Error installing Composer on Project in Laravel 4

6

I'm starting in the Laravel world and I'm having a problem running the composer install on the project. When running the command, it shows the following error:

D:\htdocs\cpi2>composer install
Loading composer repositories with package information
Installing dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - zizaco/confide dev-master requires laravelbook/ardent 2.4.x -> satisfiable
 by laravelbook/ardent[v2.4.0].
    - Conclusion: don't install laravel/framework 4.0.x-dev
    - Conclusion: don't install illuminate/validation 4.2.x-dev
    - Conclusion: don't install illuminate/support v4.1.11
    - Conclusion: don't install illuminate/support v4.1.10
    - Conclusion: don't install laravel/framework v4.0.0-BETA4|install illuminat
e/support v4.1.10
    - Conclusion: don't install illuminate/validation 4.1.x-dev
    - Conclusion: don't install illuminate/support v4.1.9
    - Conclusion: don't install illuminate/support v4.1.8
    - Conclusion: don't install illuminate/support v4.1.7
    - Conclusion: don't install laravel/framework v4.0.10
    - Conclusion: don't install illuminate/support v4.1.6
    - Conclusion: don't install laravel/framework v4.0.0-BETA3|install illuminat
e/support v4.1.10|install illuminate/support v4.1.11|install illuminate/support
v4.1.6|install illuminate/support v4.1.7|install illuminate/support v4.1.8|insta
ll illuminate/support v4.1.9
    - Conclusion: don't install illuminate/validation v4.1.12
    - Conclusion: don't install doctrine/dbal 2.4.x-dev
    - Conclusion: don't install illuminate/support v4.1.2
    - Conclusion: don't install laravel/framework v4.0.9|install illuminate/supp
ort v4.1.2
    - Conclusion: don't install illuminate/support v4.1.1
    - Conclusion: don't install illuminate/validation v4.1.11
    - Conclusion: don't install illuminate/support v4.1.0
    - Conclusion: don't install laravel/framework v4.0.8|install illuminate/supp
ort v4.1.0|install illuminate/support v4.1.1|install illuminate/support v4.1.2
    - Conclusion: don't install doctrine/dbal v2.4.2
    - Conclusion: don't install doctrine/dbal v2.4.1
    - Conclusion: don't install laravel/framework v4.0.7
    - Conclusion: don't install laravel/framework 4.1.x-dev
    - Conclusion: don't install laravel/framework 4.2.x-dev|install laravel/fram
ework 4.1.x-dev|install illuminate/support v4.1.0|install illuminate/support v4.
1.1|install illuminate/support v4.1.2
    - Conclusion: don't install illuminate/validation v4.1.10|install laravel/fr
amework 4.1.x-dev|install laravel/framework 4.2.x-dev|install illuminate/support
 v4.1.0|install illuminate/support v4.1.1|install illuminate/support v4.1.2
    - Conclusion: don't install laravel/framework v4.1.12
    - Conclusion: don't install illuminate/validation v4.1.9
    - Conclusion: don't install doctrine/dbal v2.4.0
    - Conclusion: don't install doctrine/dbal 2.4.0-RC2
    - Conclusion: don't install laravel/framework v4.0.6
    - Conclusion: don't install laravel/framework v4.1.11
    - Conclusion: don't install laravel/framework v4.1.10
    - Conclusion: don't install illuminate/validation v4.1.8
    - Conclusion: don't install doctrine/dbal 2.4.0-RC1
    - Conclusion: don't install doctrine/dbal 2.4.0-BETA2
    - Conclusion: don't install laravel/framework v4.0.5
    - Conclusion: don't install laravel/framework v4.1.9
    - Conclusion: don't install laravel/framework v4.0.1|install laravel/framewo
rk 4.1.x-dev|install laravel/framework 4.2.x-dev|install laravel/framework v4.1.
10|install laravel/framework v4.1.11|install laravel/framework v4.1.12|install l
aravel/framework v4.1.9|install illuminate/validation v4.1.10|install illuminate
/validation v4.1.11|install illuminate/validation v4.1.8|install illuminate/vali
dation v4.1.9
    - Conclusion: don't install laravel/framework v4.1.8
    - Conclusion: don't install illuminate/validation v4.1.7
    - laravel/framework v4.0.0 requires doctrine/dbal 2.4.x -> satisfiable by do
ctrine/dbal[2.4.0-BETA1, 2.4.0-BETA2, 2.4.0-RC1, 2.4.0-RC2, 2.4.x-dev, v2.4.0, v
2.4.1, v2.4.2].
    - Conclusion: don't install doctrine/dbal 2.4.0-BETA1
    - Conclusion: don't install laravel/framework v4.0.4
    - Conclusion: don't install laravel/framework v4.1.7
    - Conclusion: don't install laravel/framework v4.1.6
    - Conclusion: don't install illuminate/validation v4.1.6
    - Conclusion: don't install laravel/framework v4.1.5
    - Conclusion: don't install illuminate/validation v4.1.5
    - Conclusion: don't install laravel/framework v4.1.4
    - Conclusion: don't install laravel/framework v4.1.3
    - Conclusion: don't install laravel/framework v4.0.3|install laravel/framewo
rk v4.1.3|install laravel/framework v4.1.4
    - Conclusion: don't install laravel/framework v4.1.2
    - Installation request for zizaco/confide dev-master -> satisfiable by zizac
o/confide[dev-master].
    - Conclusion: don't install laravel/framework v4.0.2|install laravel/framewo
rk v4.1.2|install laravel/framework v4.1.3
    - laravelbook/ardent v2.4.0 requires illuminate/validation ~4.1 -> satisfiab
le by laravel/framework[4.1.x-dev, 4.2.x-dev, v4.1.0, v4.1.1, v4.1.10, v4.1.11,
v4.1.12, v4.1.2, v4.1.3, v4.1.4, v4.1.5, v4.1.6, v4.1.7, v4.1.8, v4.1.9], illumi
nate/validation[4.1.x-dev, 4.2.x-dev, v4.1.0, v4.1.1, v4.1.10, v4.1.11, v4.1.12,
 v4.1.2, v4.1.3, v4.1.4, v4.1.5, v4.1.6, v4.1.7, v4.1.8, v4.1.9].
    - Can only install one of: laravel/framework[v4.1.0, v4.0.0-BETA2].
    - Can only install one of: laravel/framework[v4.1.1, v4.0.0-BETA2].
    - don't install illuminate/validation v4.1.0|don't install laravel/framework
 v4.0.0-BETA2
    - don't install illuminate/validation v4.1.1|don't install laravel/framework
 v4.0.0-BETA2
    - don't install illuminate/validation v4.1.2|don't install laravel/framework
 v4.0.0-BETA2
    - don't install illuminate/validation v4.1.3|don't install laravel/framework
 v4.0.0-BETA2
    - don't install illuminate/validation v4.1.4|don't install laravel/framework
 v4.0.0-BETA2
    - Installation request for laravel/framework 4.0.* -> satisfiable by laravel
/framework[4.0.x-dev, v4.0.0, v4.0.0-BETA2, v4.0.0-BETA3, v4.0.0-BETA4, v4.0.1,
v4.0.10, v4.0.2, v4.0.3, v4.0.4, v4.0.5, v4.0.6, v4.0.7, v4.0.8, v4.0.9].

This is because of the project being in Laravel 4 and when looking for dependencies are looking for 4.1?

Follow my composer.json :

{
    "name": "leonelsr/cpi2",
    "description": "Comprei Por Impulso 2.0",
    "keywords": ["cpi2", "laravel"],
    "require": {
        "laravel/framework": "4.0.*",
        "zizaco/confide": "dev-master",
        "zizaco/entrust": "dev-master",
        "robclancy/presenter": "1.0.*",
        "j20/php-uuid": "dev-master",
        "bllim/datatables": "*",
        "orchestra/translation": "2.1.*",
        "baum/baum": "~1.0",
        "barryvdh/laravel-migration-generator": "dev-master"
    },
    "require-dev": {
        "way/generators": "dev-master",
        "mockery/mockery": "dev-master@dev",
        "summerstreet/woodling": "0.1.*",
        "barryvdh/laravel-ide-helper": "dev-master",
        "natxet/CssMin": "dev-master",
        "lmammino/jsmin4assetic": "1.0.*"
    },
    "autoload": {
        "classmap": [
            "app/commands",
            "app/controllers",
            "app/models",
            "app/database/migrations",
            "app/database/seeds",
            "app/tests/TestCase.php",
            "app/library"
        ]
    },
    "scripts": {
        "post-install-cmd": [
            "php artisan optimize"
        ],
        "pre-update-cmd": [
            "php artisan clear-compiled"
        ],
        "post-update-cmd": [
            "php artisan optimize"
        ],
        "post-create-project-cmd": [
            "php artisan key:generate"
        ]
    },
    "config": {
        "preferred-install": "dist"
    },
    "minimum-stability": "dev"
}
    
asked by anonymous 09.01.2014 / 13:24

6 answers

5

Change this:

"laravel/framework": "4.0.*",

To:

"laravel/framework": "4.1.*",

Ardent needs version 4.1.

    
09.01.2014 / 16:27
2

It's no use changing to "laravel/framework": "4.1.*" I already had this problem, you have to have version 4.1 and install Ardent also as I requested here

Problem 1
    - zizaco/confide dev-master requires laravelbook/ardent 2.4.x -> satisfiable
    
09.01.2014 / 20:29
2

Just fix your composer.json for:

{
   ...
   ...
    "require": {
       "laravel/framework": "4.1.*",
       ...
       ...
       ...
        "zizaco/confide": "3.1.x",
        "laravelbook/ardent": "dev-master"
    }
   ...
   ...
}

I recommend doing a new installation to avoid problems with dependencies. (If possible).

    
11.01.2014 / 13:55
0

The easiest way to solve this is to download version 4 directly, when trying to install by composer he is trying to find the latest version of the files.

Link to 4.0.9

Later unpack in the directory you want to install laravel and with the composer in the directory run:

php composer install

This last command will install laravel, however it is always advisable to use the latest version that can be downloaded as the branche master:

Link to 4.1

The rest of the process using composer is the same as above.

    
22.01.2014 / 02:51
0

For lack of Ardent updates, you need to insert this into your composer.json to avoid conflicts:

"repositories": [
    {
        "type": "vcs",
        "url": "https://github.com/Zizaco/ardent.git"
    }
],
"require": {
        "laravelbook/ardent": "dev-has-session-fix"
},

After that, run the composer update and you'll probably have it all solved.

    
04.02.2014 / 19:55
-1

Remove the following code block from your composer.json .

"scripts": {
    "post-install-cmd": [
        "php artisan optimize"
    ],
    "pre-update-cmd": [
        "php artisan clear-compiled"
    ],
    "post-update-cmd": [
        "php artisan optimize"
    ],
    "post-create-project-cmd": [
        "php artisan key:generate"
    ]
},

... this will solve 99% of the problems of your life! : D

    
05.02.2014 / 13:34