Skip to content

Test #189 #190

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

Merged
merged 4 commits into from
Aug 31, 2016
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
10 changes: 6 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,14 @@ env:
- SIMPLETEST_DB=sqlite://tmp/site.sqlite
- SIMPLETEST_BASE_URL="http://127.0.0.1:8080"
matrix:
- RELEASE=stable
- RELEASE=dev
- RELEASE=stable COMPOSER_CHANNEL=stable
- RELEASE=dev COMPOSER_CHANNEL=stable
- RELEASE=stable COMPOSER_CHANNEL=snapshot

before_install:
- echo 'sendmail_path = /bin/true' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
- phpenv config-rm xdebug.ini
- composer --verbose self-update
- composer --verbose self-update --$COMPOSER_CHANNEL
Copy link

Choose a reason for hiding this comment

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

This syntax does not seem to work as expected.

// RELEASE=stable,COMPOSER_CHANNEL=snapshot
$ composer --verbose self-update --$COMPOSER_CHANNEL
Updating to version 1.2.0 (stable channel).

- composer --version

install:
Expand All @@ -31,6 +32,7 @@ script:
- ./../vendor/bin/drush runserver http://127.0.0.1:8080 &
- sleep 3
# Skip core/tests/Drupal/Tests/ComposerIntegrationTest.php because web/ has no composer.json
- ./../vendor/bin/phpunit -c core --testsuite unit --exclude-group Composer
# Ignore PageCache group temporarily, @see https://www.drupal.org/node/2770673
- ./../vendor/bin/phpunit -c core --testsuite unit --exclude-group Composer,PageCache
- ./../vendor/bin/drush
- ./../vendor/bin/drupal
8 changes: 7 additions & 1 deletion scripts/composer/ScriptHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,15 @@ public static function checkComposerVersion(Event $event) {

$version = $composer::VERSION;

// The dev-channel of composer uses the git revision as version number,
// try to the branch alias instead.
if (preg_match('/^[0-9a-f]{40}$/i', $version)) {
$version = $composer::BRANCH_ALIAS_VERSION;
}

// If Composer is installed through git we have no easy way to determine if
// it is new enough, just display a warning.
if ($version === '@package_version@') {
if ($version === '@package_version@' || $version === '@package_branch_alias_version@') {
$io->writeError('<warning>You are running a development version of Composer. If you experience problems, please update Composer to the latest stable version.</warning>');
}
elseif (Comparator::lessThan($version, '1.0.0')) {
Expand Down