chobie / jira-api-restclient

php JIRA REST API
MIT License
218 stars 123 forks source link

Please release beta version #127

Open andkirby opened 8 years ago

andkirby commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

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

andkirby commented 8 years ago

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 commented 8 years ago

Yeah, only prefer-stable works.

andkirby commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

Thanks, @DerMika. That's exactly what I was explaining to @andkirby in https://github.com/chobie/jira-api-restclient/issues/127#issuecomment-239424316. No need to release alpha/beta to use the library.

andkirby commented 8 years ago

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 commented 8 years ago

With pure composer.json:

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

it's the same.

andkirby commented 8 years ago

I never heard it can work in your suggested way.

aik099 commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

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

andkirby commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

@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 commented 8 years ago

@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)?