Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Support zend-expressive-authentication alpha3 #15

Merged
merged 5 commits into from
Feb 26, 2018
Merged

Support zend-expressive-authentication alpha3 #15

merged 5 commits into from
Feb 26, 2018

Conversation

michalbundyra
Copy link
Member

Fixes #14 by removing unused trait.

@@ -26,10 +26,10 @@
"psr/container": "^1.0",
"psr/http-message": "^1.0.1",
"psr/http-server-middleware": "^1.0",
"zendframework/zend-expressive-authentication": "^1.0.0alpha1 || ^1.0"
"zendframework/zend-expressive-authentication": "^1.0.0alpha3"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you remove ^1.0?

@michalbundyra
Copy link
Member Author

michalbundyra commented Feb 24, 2018 via email

@geerteltink
Copy link
Member

geerteltink commented Feb 24, 2018

I agree with increasing the minimum requirement to ^1.0.0alpha3. I don't understand why you need to remove the ^1.0 constraint.

Edit: Let me explain... The build was failing because the minimum requirement was ^1.0.0alpha1, not because the ^1.0 was there. Using ^1.0 shouldn't make a difference as it is for stable releases only.

@jguittard
Copy link
Contributor

jguittard commented Feb 24, 2018 via email

@geerteltink
Copy link
Member

geerteltink commented Feb 24, 2018

How about 1.0.x-dev?

Not sure if that works with the lowest test. What we have in other expressive packages is like this:

"zendframework/zend-expressive-router": "^3.0.0alpha1 || ^3.0",.

I'd like to see some consistency across all packages :)

@jguittard
Copy link
Contributor

jguittard commented Feb 24, 2018 via email

@michalbundyra
Copy link
Member Author

michalbundyra commented Feb 24, 2018 via email

@michalbundyra
Copy link
Member Author

I've created that issue: composer/composer#7137
We will see what will be the response, maybe we are doing something wrong?

@geerteltink
Copy link
Member

geerteltink commented Feb 26, 2018

Or our numbering of alpha versions is wrong: https://semver.org/spec/v2.0.0.html#spec-item-9

Examples: 1.0.0-alpha, 1.0.0-alpha.1

@weierophinney
Copy link
Member

I've never seen alpha, beta, or rc use anything other than `/(a|alpha|b|beta|rc)\d+/i' syntax; that semver doc is an outlier. :-/

With regards to prefer-lowest, I recall seeing that with the skeleton's alpha3 release when I was preparing it. My recollection is that it only downgraded to a previous alpha if the minimum-stability was less than alpha (i.e. "dev"). Once I'd set the stability to alpha, I no longer observed that behavior.

In the meantime, surprisingly, ^3.0.0alpha3 will also install all 3.X stable versions I discovered, so long as the minimum-stability is at least alpha.

@weierophinney
Copy link
Member

Not sure if that works with the lowest test. What we have in other expressive packages is like this:

"zendframework/zend-expressive-router": "^3.0.0alpha1 || ^3.0",.

I'd like to see some consistency across all packages :)

That usage is the problematic usage.

As @webimpress notes (I've confirmed locally), Composer is erroneously selecting an earlier alpha release when we include the || ^3.0 constraint. It should be looking only for a stable package with that constraint, but is instead looking at any alpha releases as well; my guess is that this is due to having previously installed an alpha, or having one side of the OR constraint allow an alpha.

What works as a workaround is only including the constraint that lists the minimum alpha release we allow. What's interesting about that is that this will continue to pick up any stable releases as well, as if we'd pinned to ^3.0.0.

The same trait from zend-expressive-authentication is used
Fixes #14
If we have "^1.0.0alpha3 || ^1.0" also alpha1 is accepted when install
lowest dependencies
@weierophinney weierophinney merged commit 2077ae9 into zendframework:release-1.0.0 Feb 26, 2018
weierophinney added a commit that referenced this pull request Feb 26, 2018
weierophinney added a commit that referenced this pull request Feb 26, 2018
@weierophinney
Copy link
Member

Thanks, @webimpress

@michalbundyra michalbundyra deleted the authentication-alpha3 branch February 26, 2018 17:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants