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

Please release beta version #127

Open
andkirby opened this issue Aug 12, 2016 · 24 comments · Fixed by #128
Open

Please release beta version #127

andkirby opened this issue Aug 12, 2016 · 24 comments · Fixed by #128

Comments

@andkirby
Copy link

Hi @aik099,

I have found people requested release of 2.x version. In case it's still under development, it could release at least BETA version.

Anyway, according to versioning I cannot use DEV version. It's not stable at all. If you provided a version which can be used externally it can be BETA version.

Try to use http://semver.org/ for your versioning. It's a good pattern.
Also, the main cause why it's needed because composer minimum-stability.
I must set it to "dev" to fetch the package. In this case other packages can be, even will be, fetched as DEV versions what is really bad because they can be completely unstable.

Assuming aforesaid, I would like to ask you to add your first BETA version. We are really need it.
After a while you may push it stable if there are no serious issues and if it works for you. Just to mark it as stable if it really is.
We are looking forward to v2.0.0-beta. :)

Thanks in advance, and thanks for your efforts in this module!

@aik099
Copy link
Collaborator

aik099 commented Aug 12, 2016

Anyway, according to versioning I cannot use DEV version. It's not stable at all. If you provided a version which can be used externally it can be BETA version.

I'm not sure if current dev-master is stable at all. Releasing it as 2.0.0-b1 won't make it any more stable 😄 Current test coverage is very low and I myself only use couple of API calls, that I'm sure work, but I can't say that all API calls work.

Also, the main cause why it's needed because composer minimum-stability.

Why you're setting that at all in your project's composer.json file? By default only stable dependency versions are downloaded anyway.

I must set it to "dev" to fetch the package. In this case other packages can be, even will be, fetched as DEV versions what is really bad because they can be completely unstable.

I'm presuming php composer.phar require chobie/jira-api-restclient 2.0@dev command doesn't work for you? This command is specifically designed to allow all other dependencies to have stable versions, while this particular package having dev version.

@andkirby
Copy link
Author

andkirby commented Aug 12, 2016

I'm not sure if current dev-master is stable at all. Releasing it as 2.0.0-b1 won't make it any more stable

If it's used externally, it's already somehow usable. Maybe it's not RC but it's a BETA.

Current test coverage is very low and I myself only use couple of API calls, that I'm sure work, but I can't say that all API calls work.

It doesn't matter for BETA. You aren't going to claim it as stable.

Why you're setting that at all in your project's composer.json file? By default only stable dependency versions are downloaded anyway.

I'm not sure what do you mean. The command below requires setting minimum-stability: dev which affects other packages.

php composer.phar require chobie/jira-api-restclient 2.0@dev

If I have minimum-stability higher than "dev" this command won't work. If I set minimum-stability: dev and run composer update all available packages will changed to their latest "dev" version. That's the main problem.
Anyway you cannot provide blur version like 2.0.x-dev for other people. Make some milestone. E.g. I use the code code from Jan'2016. I released my app and someone got it in half of a yeah, he got new updates from you and they broke the app. It can be changed in any time. This approach is not stable, not the code.
DEV - for developers, ALPHA - internal testing, and BETA - external testing/usage. The last two requires milestones - particular versions.

@andkirby
Copy link
Author

I would even say, you must not require branches in composer. It's the worst way for making stable packages. But the module has a branch only for last updates.

@aik099
Copy link
Collaborator

aik099 commented Aug 12, 2016

When you specify version as 2.0.0@dev, then @dev part is changing minimum stability for that only dependency to dev which allows it be be used.

I'm not sure, why this isn't work for you.

P.S.
This @dev trick would only work in root composer.json.

@aik099
Copy link
Collaborator

aik099 commented Aug 12, 2016

I would even say, you must not require branches in composer.

The @dev doesn't explicitly say use master branch, but what it does is using branch alias. This way once branch alias is changed to say 2.1.x the 2.0.0@dev won't get you new commits on master branch since that point of time.

@andkirby
Copy link
Author

That's a version range. That's not a version.

@andkirby
Copy link
Author

andkirby commented Aug 12, 2016

Look, let's go to practice.
composer.json file:

$ cat composer.json
{
    "minimum-stability": "dev",
    "require": {
        "andkirby/commithook": "~2.0@beta"
    }
}

I gonna install it.

$ composer install
Loading composer repositories with package information
Updating dependencies (including require-dev)
  - Installing symfony/event-dispatcher (2.8.x-dev 889983a)
    Cloning 889983a79a043dfda68f38c38b6dba092dd49cd8 from cache

  - Installing guzzle/guzzle (dev-master b3f5050)
    Cloning b3f5050cb6270c7a728a0b74ac2de50a262b3e02 from cache

  - Installing knplabs/github-api (1.7.x-dev 98d0bcd)
    Cloning 98d0bcd2c4c96a40ded9081f8f6289907f73823c from cache

  - Installing zendframework/zend-stdlib (dev-develop 1808d6c)
    Cloning 1808d6cf13c9d317508646ae1744a4f26c6f1407 from cache

  - Installing zendframework/zend-eventmanager (dev-develop 28b26ff)
    Cloning 28b26fff230ffb8976d1d71fd1305ce886326d86 from cache

  - Installing container-interop/container-interop (1.1.0)
    Loading from cache

  - Installing zendframework/zend-servicemanager (dev-develop 05fbf99)
    Cloning 05fbf994af4b443c788d6883dd281240afce2d08 from cache

  - Installing zendframework/zend-cache (dev-master 1f6d041)
    Cloning 1f6d04160118b4c1cb15005c52cb856643f7bdea from cache

  - Installing chobie/jira-api-restclient (dev-master dd4bfc6)
    Cloning dd4bfc6c7114f3306693345d7126ac8d6a642a19 from cache

  - Installing symfony/finder (2.8.x-dev 60804d8)
    Cloning 60804d88691e4a73bbbb3035eb1d9f075c5c2c10 from cache

  - Installing symfony/filesystem (2.8.x-dev ab4c3f0)
    Cloning ab4c3f085c8f5a56536845bf985c4cef30bf75fd from cache

  - Installing symfony/polyfill-mbstring (dev-master 8a6bdec)
    Cloning 8a6bdec191138e01c92ae026e5aacb7b3e66267d from cache

  - Installing symfony/console (dev-master f82f474)
    Cloning f82f4744a58cf6846decbdbe29d3d8a1e6bf5d6a from cache

  - Installing andkirby/console-helper (v0.4.0)
    Loading from cache

  - Installing andkirby/commithook (v2.0.0-beta.18)
    Loading from cache

[...]
Generating autoload files

All packages use DEV version.

Do you see the problem?

@andkirby
Copy link
Author

Yeah, only prefer-stable works.

@andkirby
Copy link
Author

andkirby commented Aug 12, 2016

Anyway, I don't why you cannot release at least beta version if people already use it, I don't see any obstacles. The package even don't alpha versions. No milestones at all.

@DerMika
Copy link
Contributor

DerMika commented Aug 12, 2016

I don't understand why you think you need "minimum-stability": "dev" in your composer.json to be able to install this library. You can just omit that line and add this

{
    "require": {
        "chobie/jira-api-restclient": "2.0.0@dev"
    }
}

to your composer.json.

You'll have all your usual packages at their usual versions, but for this library you'll be using the 2.0.0 dev branch.

@aik099
Copy link
Collaborator

aik099 commented Aug 12, 2016

Thanks, @DerMika. That's exactly what I was explaining to @andkirby in #127 (comment). No need to release alpha/beta to use the library.

@andkirby
Copy link
Author

Ok, I've set it:

  "minimum-stability": "stable",

And in require

    "chobie/jira-api-restclient": "2.0.0@dev",

I got this:

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - The requested package chobie/jira-api-restclient 2.0.0@dev exists as chobie/jira-api-restclient[dev-master, 2.0.x-dev, v1.0.0] but these are rejected by your constraint.

@andkirby
Copy link
Author

With pure composer.json:

{
    "require": {
        "chobie/jira-api-restclient": "2.0.0@dev"
    }
}

it's the same.

@andkirby
Copy link
Author

I never heard it can work in your suggested way.

@aik099
Copy link
Collaborator

aik099 commented Aug 12, 2016

My appologies @andkirby . Now I see where the problem is. In the README command should be

php composer.phar require chobie/jira-api-restclient ^2.0@dev

instead of

php composer.phar require chobie/jira-api-restclient 2.0@dev

There is ^ added in front of 2.0@dev. With it all works fine. Thanks for helping figuring that out.

@aik099
Copy link
Collaborator

aik099 commented Aug 12, 2016

This wasn't working because dev-master is alias to 2.0.x version and not to 2.0.0 specifically. With ^ exactly 2.0.0 version is transformed into version range, which now also includes 2.0.x aliased version.

I've created #128 PR with a fix to README.

@andkirby
Copy link
Author

andkirby commented Aug 12, 2016

Heh, ok )) Yeah, it works for "stable" mode.
About #128.
In this case, I would suggest to use ~2.0@dev instead ^2.0@dev because the last one includes 3.x as well which is not compatible with 2.x and could lead to unexpected issues..

@aik099
Copy link
Collaborator

aik099 commented Aug 12, 2016

In this case, I would suggest to use ~2.0@dev instead ^2.0@dev because the last one includes 3.x as well which is not compatible with 2.x and could lead to unexpected issues..

Documentation page at https://getcomposer.org/doc/articles/versions.md#caret doesn't say it will. I've also found good article about version constraints: https://blog.madewithlove.be/post/tilde-and-caret-constraints/

@andkirby
Copy link
Author

Hm, true... Maybe it was before. Thanks for this point.
Thanks.

@andkirby andkirby reopened this Aug 18, 2016
@andkirby
Copy link
Author

Hi :)

So, your approach works only if I require the package chobie/jira-api-restclient before another one which requires it too.

{
    "minimum-stability": "beta",
    "prefer-stable": true,
    "require": {
        "chobie/jira-api-restclient": "^2.0@dev",
        "andkirby/commithook": "v2.0.0-beta.24"
    }
}

For me it's overhead.

So, this doesn't work:

{
    "minimum-stability": "beta",
    "prefer-stable": true,
    "require": {
        "andkirby/commithook": "v2.0.0-beta.24"
    }
}

@jpastoor
Copy link
Collaborator

For what it's worth, Im doing my best to get a release done soon. (Feel free to tag along and fix some issues in the 2.0.0 milestone list).

With proper releases we won't have all the above hassle.

@aik099
Copy link
Collaborator

aik099 commented Aug 18, 2016

So, your approach works only if I require the package chobie/jira-api-restclient before another one which requires it too.

@andkirby the order (before/after) doesn't matter. You just need to mention it in topmost composer.json.

@andkirby
Copy link
Author

@aik099, I didn't mean the order in composer.json, yes, it doesn't matter, I would say it should be required before if you use composer require command.

@jpastoor, does this list contains only critical/blocker issues? Maybe consumers could "live" with them so far in beta versions?

@aik099
Copy link
Collaborator

aik099 commented Aug 19, 2016

@andkirby as we already figured out releasing beta won't allow it be used due minimum stability setting anyway.

I guess you have project that you want others to use, but you need stable version to avoid specifying 2 dependencies (to your project and yo @dev version of this library)?

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

Successfully merging a pull request may close this issue.

4 participants