Closed samsonasik closed 7 years ago
hm.., phpunit 4 seems keep failing with error:
1) ZendTest\Test\PHPUnit\Controller\AbstractConsoleControllerTestCaseTest::testAssertResponseStatusCode
Failed asserting response code "1", actual status code is "0"
@Ocramius how about remove phpunit 4 support?
@samsonasik
I think, the answer is really simple:
zend-test
requires PHP 5.6 or PHP 7.0@froschdesign I've tried use ^5.0 || ^6.0
. But it seems the 5.0 I keep get error:
1) ZendTest\Test\PHPUnit\Controller\AbstractConsoleControllerTestCaseTest::testAssertResponseStatusCode
Failed asserting response code "1", actual status code is "0"
As with dependency lowest, it install exact phpunit 5.0 which expectException()
and expectExceptionMessage()
not exists yet, and it seems I am wrongly make redefine the compat, any suggestion for make it compatible ?
@samsonasik
^5.7 || ^6.0
?!@froschdesign thank you. I've updated to use phpunit ^5.7 || ^6.0
and update .travis.yml in favor of #39 .
Travis should be green now ;)
@froschdesign @Ocramius travis green ;)
@froschdesign @Ocramius should be ready for merge now ;)
@Koopzington I used your config .travis.yml
at #39 and it seems one of travis got silent error:
0.40s$ if [[ $TEST_COVERAGE == 'true' ]]; then composer upload-coverage ; fi
> coveralls -v
sh: 1: coveralls: not found
Script coveralls -v handling the upload-coverage event returned with error code 127
could you verify ? see: https://travis-ci.org/zendframework/zend-test/jobs/199399047
@samsonasik I think you are missing two things:
env:
global:
[...]
- COVERAGE_DEPS="satooshi/php-coveralls"
and:
install:
- if [[ $TEST_COVERAGE == 'true' ]]; then travis_retry composer require --dev $COMPOSER_ARGS $COVERAGE_DEPS ; fi
@webimpress your comment already closed by a lot of diff closed. what do you mean with remove:
--ignore-platform-reqs
? from what ?
@samsonasik in afa49d0 you've added back PHP 5.6 with latest dependencies, but this is wrong, because you have global env:
COMPOSER_ARGS="--no-interaction --ignore-platform-reqs"
so it tries to install PHPUnit 6.0 on PHP5.6 - which is not supported.
Please change this global env to:
COMPOSER_ARGS="--no-interaction"
and than all should be fine.
You can also make more changes in travis configuration to be consistent with other zend repositories, please see for example: https://github.com/zendframework/zend-expressive/blob/master/.travis.yml
@webimpress actually, the errow when using --ignore-platform-reqs on php 5.6 is on phpunit run itself:
> phpunit --colors=always
This version of PHPUnit is supported on PHP 7.0 and PHP 7.1.
You are using PHP 5.6.5 (/home/travis/.phpenv/versions/5.6.5/bin/php).
Script phpunit --colors=always handling the test event returned with error code 1
@webimpress ok, done
now it error on php 7+ with locked dependencies:
$ travis_retry composer install $COMPOSER_ARGS
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for doctrine/instantiator 1.0.2 -> satisfiable by doctrine/instantiator[1.0.2].
- doctrine/instantiator 1.0.2 requires php ~5.3 -> your PHP version (7.0.15) does not satisfy that requirement.
Problem 2
- doctrine/instantiator 1.0.2 requires php ~5.3 -> your PHP version (7.0.15) does not satisfy that requirement.
- phpunit/phpunit-mock-objects 3.4.1 requires doctrine/instantiator ^1.0.2 -> satisfiable by doctrine/instantiator[1.0.2].
- Installation request for phpunit/phpunit-mock-objects 3.4.1 -> satisfiable by phpunit/phpunit-mock-objects[3.4.1].
I've updated composer.lock with updated COMPOSER_ARGS="--no-interaction"
@Ocramius @froschdesign @webimpress travis green again \m/ . Thanks ;)
I missed this when I created and merged #48, but this is now fully supported.
ping @Ocramius in favor of #40 which inside src/ was still no classalias of `PHPUnit
class, and define
expectException()and
expectExceptionMessage()` if no exists.It should compat with phpunit 4, 5, and 6 now.