Skip to content

Commit

Permalink
remove hhvm and php 5.5 support
Browse files Browse the repository at this point in the history
hhvm is not even supported by composer anymore and php 5.5 long eol. this way we can also update phpunit.
  • Loading branch information
Tobion committed Jun 11, 2019
1 parent 5a32ee5 commit 1db3046
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 25 deletions.
13 changes: 3 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
phpunit.xml
composer.phar
composer.lock
composer-test.lock
vendor/
build/artifacts/
artifacts/
docs/_build
docs/*.pyc
.idea
.DS_STORE
vendor/
composer.lock
phpunit.xml
8 changes: 1 addition & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,23 @@
language: php

sudo: false
dist: xenial

cache:
directories:
- $HOME/.composer/cache/files

php:
- 5.5
- 5.6
- 7.0
- 7.1
- 7.2
- 7.3
- hhvm

env:
global:
- TEST_COMMAND="composer test"

matrix:
allow_failures:
- php: hhvm
fast_finish: true
include:
- php: 5.5
Expand All @@ -31,8 +27,6 @@ before_install:
- if [[ $COVERAGE != true ]]; then phpenv config-rm xdebug.ini || true; fi

install:
# To be removed when this issue will be resolved: https://github.com/composer/composer/issues/5355
- if [[ "$COMPOSER_FLAGS" == *"--prefer-lowest"* ]]; then travis_retry composer update --prefer-dist --no-interaction --prefer-stable --quiet; fi
- travis_retry composer update ${COMPOSER_FLAGS} --prefer-dist --no-interaction

script:
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
}
],
"require": {
"php": ">=5.5.0"
"php": ">=5.6"
},
"require-dev": {
"phpunit/phpunit": "^4.8.36"
"phpunit/phpunit": "^5.7.27 || ^7.5"
},
"autoload": {
"psr-4": {
Expand Down
9 changes: 7 additions & 2 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit colors="true" bootstrap="vendor/autoload.php">
<phpunit
colors="true"
beStrictAboutOutputDuringTests="true"
beStrictAboutTestsThatDoNotTestAnything="false"
bootstrap="vendor/autoload.php"
>
<testsuites>
<testsuite name="GuzzleHttp Promise Test Suite">
<directory>tests/</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<directory suffix=".php">src/</directory>
<directory>src/</directory>
<exclude>
<directory suffix="Interface.php">src/</directory>
</exclude>
Expand Down
6 changes: 2 additions & 4 deletions tests/functionsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -532,15 +532,13 @@ public function testAsyncPromisesWithCorrectlyYieldedValues()
];

$promise = P\coroutine(function () use ($promises) {
$value = null;
$this->assertEquals('skip', (yield new FulfilledPromise('skip')));
foreach ($promises as $idx => $p) {
$value = (yield $p);
$this->assertEquals($value, $idx);
$this->assertEquals($idx, (yield $p));
$this->assertEquals('skip', (yield new FulfilledPromise('skip')));
}
$this->assertEquals('skip', (yield new FulfilledPromise('skip')));
yield $value;
yield 2;
});

$promises[0]->resolve(0);
Expand Down

7 comments on commit 1db3046

@GrahamCampbell
Copy link
Member

Choose a reason for hiding this comment

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

Removing PHP 5.5 support was a bad idea because Guzzle 6's phars need to work on PHP 5.5.

@Tobion
Copy link
Member Author

@Tobion Tobion commented on 1db3046 Jun 17, 2020

Choose a reason for hiding this comment

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

Why is php 5.5 needed in guzzle? You can just releaes a minor version of guzzle that removes php 5.5 support.

@GrahamCampbell
Copy link
Member

Choose a reason for hiding this comment

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

Restoring PHP 5.5 support is easy. I will send a PR.

@GrahamCampbell
Copy link
Member

Choose a reason for hiding this comment

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

There is no need to drop it in Guzzle 6. Guzzle 7 will be released next week and drops PHP less than 7.1 entirely. We need to keep Guzzle 6 on PHP 5.5.

@Tobion
Copy link
Member Author

@Tobion Tobion commented on 1db3046 Jun 17, 2020

Choose a reason for hiding this comment

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

guzzle/promises without php 5.5 is not even released yet. Is there a bugfix in promised that guzzle needs? Or what's the reason to restore php 5.5 support?

@GrahamCampbell
Copy link
Member

@GrahamCampbell GrahamCampbell commented on 1db3046 Jun 17, 2020

Choose a reason for hiding this comment

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

Yes. There are some bugs affecting PHP 7.2+. The idea is to have 1.4.0 tagged, and rebuild a guzzle phar that works on PHP 5.5 through 7.4 (at some point in the near future).

@GrahamCampbell
Copy link
Member

Choose a reason for hiding this comment

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

Please sign in to comment.