Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using ~3.0 pulls 3.1 #272

Closed
davidyell opened this issue Aug 5, 2015 · 15 comments
Closed

Using ~3.0 pulls 3.1 #272

davidyell opened this issue Aug 5, 2015 · 15 comments
Labels

Comments

@davidyell
Copy link

What I did
Removed my vendor folder, cleared composer cache, and then updated. Using cakephp/cakephp: ~3.0 in my json.

What happened

  - Installing cakephp/cakephp (3.1.x-dev a87c87f)
    Cloning a87c87f1bc73059e3fcb5f0bbf16240e74099720

What I expected to happen
I was expecting 3.0.10 to be installed.

@lorenzo lorenzo added the Defect label Aug 5, 2015
@GuidoHendriks
Copy link

Doesn't happen for me. Tried both an existing project and a new project. For the existing project I did clear the cache, remove the composer.lock and deleted the vendor files. Get 3.0.10 for both the new and existing project.

@markstory
Copy link
Member

What is your minimum-stability value?

@davidyell
Copy link
Author

For me, I have "minimum-stability": "dev"

@GuidoHendriks
Copy link

@davidyell Could you possibly post your complete composer.json? My guess is still that there's something wrong in there, maybe in the require-dev which overrules the require?

@davidyell
Copy link
Author

    "require-dev": {
      "cakephp/cakephp-codesniffer": "~2.0",
      "cakephp/bake": "~1.0"
    },

So unless one of these has a dependancy of 3.1

@ADmad
Copy link
Member

ADmad commented Aug 5, 2015

(3.1.x-dev a87c87f)

a87c87f is not even current HEAD of 3.1 branch.

@davidyell
Copy link
Author

I've kinda sidestepped the issue by using 3.0.* in the project now, but I thought that it might affect others. I guess not 😕

@dereuromark
Copy link
Member

With "minimum-stability": "dev" isnt that expected behavior? Removing that should only pull stable versions.

@GuidoHendriks
Copy link

But "minimum-stability": "dev" is what you get by default if you create a new CakePHP project. And that definitely won't give you unstable branches by default.

@GuidoHendriks
Copy link

Was looking at my composer.json again and spotted the "prefer-stable": true. Did you happen to change or got rid of this? When I change it to false, it does go to 3.1.x-dev c5990f9.

@davidyell
Copy link
Author

So make of this what you will.

https://github.com/cakephp/app/blob/master/composer.json#L38-L39

@GuidoHendriks
Copy link

Can't really make anything of that, that just confirms everything I said. 👍

@dereuromark
Copy link
Member

We can then probably close this as we now know how to prevent 3.1 to be pulled :)

@htstudios
Copy link
Contributor

Reading compiser docs today, ~3.0 will get you ~3.x whereas ~3.0.0 wil get you 3.0.x - also ^3.0 should work getting you 3.0.x afair. For me those also get unstable versions btw.

@markstory
Copy link
Member

@jhli You will get unstable versions with ~3.0 if you have the minimum-stability set to dev or beta.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants