diff --git a/.travis.yml b/.travis.yml index 65bd6ba..ff444b7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,16 +18,16 @@ matrix: CHECK_MBSTRING=1 - dist: precise php: "5.6" - env: USE_PSALM=1 + env: USE_PSALM=0 CHECK_MBSTRING=1 - php: "7.0" - env: USE_PSALM=1 + env: USE_PSALM=0 CHECK_MBSTRING=1 - php: "7.1" - env: USE_PSALM=1 - CHECK_MBSTRING=1 + env: USE_PSALM=0 + CHECK_MBSTRING=0 - php: "7.2" - env: USE_PSALM=1 + env: USE_PSALM=0 CHECK_MBSTRING=0 - php: "7.3" env: USE_PSALM=1 @@ -36,7 +36,7 @@ matrix: env: USE_PSALM=1 CHECK_MBSTRING=0 - php: "nightly" - env: USE_PSALM=1 + env: USE_PSALM=0 CHECK_MBSTRING=0 - php: "hhvm" env: USE_PSALM=1 @@ -45,15 +45,18 @@ matrix: env: USE_PSALM=1 CHECK_MBSTRING=0 allow_failures: + - php: "nightly" - php: "hhvm" - php: "master" install: - - composer self-update - - composer install - - if [[ $USE_PSALM -eq 1 ]]; then composer require --dev "vimeo/psalm:^0|^1|^2"; fi + - travis_retry composer install + - if [[ $USE_PSALM -eq 1 ]]; then composer require --dev "phpunit/phpunit:>=4"; fi + - if [[ $USE_PSALM -eq 1 ]]; then rm composer.lock; fi + - if [[ $USE_PSALM -eq 1 ]]; then rm -rf vendor; fi + - if [[ $USE_PSALM -eq 1 ]]; then composer require --dev "vimeo/psalm:^3"; fi script: - vendor/bin/phpunit - - php -dmbstring.func_overload=7 vendor/bin/phpunit + - if [[ $CHECK_MBSTRING -eq 1 ]]; then php -dmbstring.func_overload=7 vendor/bin/phpunit; fi - if [[ $USE_PSALM -eq 1 ]]; then vendor/bin/psalm; fi diff --git a/other/phpunit-shim.php b/other/phpunit-shim.php new file mode 100644 index 0000000..3c5d0e2 --- /dev/null +++ b/other/phpunit-shim.php @@ -0,0 +1,6 @@ += 5.3 + * + * Class PHPUnit_Framework_TestCase + */ +if (PHP_VERSION_ID >= 50300) { + if (!class_exists('PHPUnit_Framework_TestCase')) { + require_once __DIR__ . '/other/phpunit-shim.php'; + } +} diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 19c5e22..4887008 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,31 +1,13 @@ - - - - tests/unit - - - - - ./tests/unit - - - - - ./lib - - + + + + ./lib + + + + + ./tests/unit + + diff --git a/psalm-autoload.php b/psalm-autoload.php index d71d1b8..fb0c89a 100644 --- a/psalm-autoload.php +++ b/psalm-autoload.php @@ -1,9 +1,9 @@ + + - + + + + + - + - + + + - + - + - + - +