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 older composer version syntax to support older builds of composer #595

Merged
merged 2 commits into from May 28, 2015

Conversation

mtdowling
Copy link
Member

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

@GrahamCampbell
Copy link
Contributor

👎 composer has supported this for over 6 months now.

@mtdowling
Copy link
Member Author

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 | and || are equivalent?

@GrahamCampbell
Copy link
Contributor

I'd have to check the source to be 100% sure.

@jeremeamia
Copy link
Contributor

Could we do >=5.3,<7?

@mtdowling
Copy link
Member Author

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?

On May 27, 2015, at 6:05 PM, Jeremy Lindblom notifications@github.com wrote:

Could we do >=5.3,<7?


Reply to this email directly or view it on GitHub.

"guzzlehttp/psr7": "^1.0",
"guzzlehttp/promises": "^1.0",
"mtdowling/jmespath.php": "^2.2"
"guzzlehttp/guzzle": ">=5.3|>=6.0.1,<7",

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.

Copy link
Contributor

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.

Copy link
Contributor

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.

Choose a reason for hiding this comment

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

what parse error?

Copy link
Contributor

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...

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.

Copy link
Contributor

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.

@mtdowling
Copy link
Member Author

As per @GrahamCampbell's suggestion, I've update the version constraint to >=5.3|~6.0.1|~6.1

mtdowling added a commit that referenced this pull request May 28, 2015
Using older composer version syntax to support older builds of composer
@mtdowling mtdowling merged commit 2745649 into master May 28, 2015
@mtdowling mtdowling deleted the older-composer-syntax branch May 29, 2015 02:07
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 this pull request may close these issues.

None yet

4 participants