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

[Composer] Allow imagine-library version 0.7.0 #958

Merged
merged 1 commit into from
Jul 9, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ env:
matrix:
include:
- php: 5.3
env: COMPOSER_FLAGS="--prefer-lowest"
env: COMPOSER_FLAGS="--prefer-lowest" IMAGINE_VERSION=^0.6.3
dist: precise
- php: 5.6
env: SYMFONY_VERSION=2.3.x-dev
Expand Down Expand Up @@ -53,6 +53,7 @@ before_install:
- if [ "${TRAVIS_PHP_VERSION}" == "5.3" ]; then composer remove --no-update --dev satooshi/php-coveralls; fi;
- if [ "${SYMFONY_VERSION:0:3}" == "2.3" ]; then composer remove --no-update --dev friendsofphp/php-cs-fixer; fi;
- if [ "${SYMFONY_VERSION:-x}" != "x" ]; then composer require "symfony/symfony:${SYMFONY_VERSION}" --no-update; fi;
- if [ "${IMAGINE_VERSION:-x}" != "x" ]; then composer require "imagine/Imagine:${IMAGINE_VERSION}" --no-update; fi;
- if [ "${TRAVIS_PHP_VERSION}" != "hhvm" ] && [ "${TRAVIS_PHP_VERSION:0:3}" != "5.3" ]; then composer require --no-update --dev league/flysystem:~1.0; fi;
- if [ "${TRAVIS_PHP_VERSION}" != "hhvm" ] && [ "${TRAVIS_PHP_VERSION:0:1}" != "7" ]; then yes "" | pecl -q install -f mongo; composer require --no-update --dev doctrine/mongodb-odm:~1.0; fi;
- if [ "${TRAVIS_PHP_VERSION}" != "hhvm" ] && [ "${TRAVIS_PHP_VERSION:0:1}" == "7" ]; then yes "" | pecl -q install -f mongodb; travis_retry composer require --dev alcaeus/mongo-php-adapter:~1.0; composer require --no-update --dev doctrine/mongodb-odm:~1.0; fi
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
},
"require": {
"php": "^5.3.9|^7.0",
"imagine/Imagine": "^0.6.3,<0.7",
"imagine/Imagine": "^0.6.3|^0.7.0,<0.8",
Copy link

Choose a reason for hiding this comment

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

The ,<0.8 is not necessary. ^0.7.0 means >=0.7.0 <0.8.0.

Copy link
Collaborator Author

@robfrawley robfrawley Jul 3, 2017

Choose a reason for hiding this comment

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

I realize; I believe the current syntax was used to provide clarity, as even before the change when it was ^0.6.3,<0.7, the <0.7 was unnecessary. It's important to note that the rule you mentioned only applies for fully enumerated versions [above 1.x], so it may be a good idea to retain the upper constraint so when someone comes along and changes it to, say ^1.0, we don't open the floodgates.

There are a bunch of ways to write this, such as ^0.6.3|^0.7.0,<0.8, >=0.6.3,~0.6,<0.8, >=0.6.3,<0.8 or ~0.6.3|~0.7.0 (the latter of which I personally prefer), but the original intention seems to have been verbosity, which the current syntax provides, no?

If anything, I'd prefer ~0.6.3|~0.7.0, honestly.

Copy link

Choose a reason for hiding this comment

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

^0.7 and ^0.7.0 are actually equivalent. But I understand your point. It is more clear for those who don't know how the the caret operator works.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It's important to note that the rule you mentioned only applies for fully enumerated versions

I meant to append that with "above 1.x" and I obviously used the wrong example of 0.7 where I intended to use 1.0. Was typing quickly. ;-)

"symfony/asset": "~2.3|~3.0",
"symfony/filesystem": "~2.3|~3.0",
"symfony/finder": "~2.3|~3.0",
Expand Down