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 older composer version syntax to support older builds of composer #595
Conversation
👎 composer has supported this for over 6 months now. |
I appreciate that. Unfortunately we need to make this change for now. I was hoping you could inform me on this: do you know if the syntax of |
I'd have to check the source to be 100% sure. |
Could we do |
Kind of, but it's really fragile. For example, what if we only wanted 6.1 and up because of a new required feature? Or 6.0.1 and up for a bug fix?
|
"guzzlehttp/psr7": "^1.0", | ||
"guzzlehttp/promises": "^1.0", | ||
"mtdowling/jmespath.php": "^2.2" | ||
"guzzlehttp/guzzle": ">=5.3|>=6.0.1,<7", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would do ~5.3||^6.0.1
or ~5.3||~6.0.1||~6.1
if you want to avoid the caret sign.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
~5.3||^6.0.1
wouldn't avoid it, and would result in a parse error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
~5.3||~6.0.1||~6.1
would work fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what parse error?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The one you get if you use a really old verion of composer...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what you said is what I said then.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, i can't remember the exact error off the top of my head. If you're interested try it out I guess.
As per @GrahamCampbell's suggestion, I've update the version constraint to |
Using older composer version syntax to support older builds of composer
This commit updates the SDK to use older composer.json syntax to support older builds of composer. This converts
^
usage to~
and||
usage to|
. I'm not sure if|
is exactly equivalent to||
, but it seems to be based on testing it locally./cc @GrahamCampbell