Marcin Nabiałek
Marcin Nabiałek

Reputation: 111829

composer update - doesn't get the newest version

I would like to install the newest Codeception. According to the docs the latest stable version is 2.1.2

However when I put in my composer.json:

"codeception/codeception": "*",

I'm getting commit b5af3aac061ffaeb65ed023534b3c50558e90d07 which is really old and doesn't have some issues fixes.

The question is - why composer doesn't take the latest changes from 2.1 branch and what to do to force it to do it?

Upvotes: 2

Views: 1606

Answers (1)

Jens A. Koch
Jens A. Koch

Reputation: 41747

The question is - why composer doesn't take the latest changes from 2.1 branch and what to do to force it to do it?

You are requiring a tag.

There is a difference between tags (2.1.2 / 2.1.0) and branches (2.1). The tags are static, while the branches are dynamic, still getting things on top.

When using * Composer will figure out the highest/latest tag version and use it and thats 2.1.2 with 521adbb2. If you specify 2.1, it would resolve to tag 2.1.0 with ref b5af3aac061ffa.

So, you might change from requiring tags to using branches instead:

"codeception/codeception": "2.1.x-dev" will fetch commit "c52a7384a7f60" from branch "2.1".

Please be aware that this is a moving target - a development branch. And it should probably be a development dependency(, but that depends on the project).


composer.json

{
    "require-dev": {
        "codeception/codeception": "2.1.x-dev"
    }
}

composer install

Upvotes: 2

Related Questions