Skip to content

Commit

Permalink
Drop support for PHP 7.2 and PHPUnit 8.x/9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jakzal committed Apr 6, 2020
1 parent 26d51b9 commit 89d8c5a
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .scrutinizer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ inherit: true
build:
environment:
php:
version: 7.2
version: 7.4
tests:
override:
- make test
Expand Down
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
language: php
matrix:
include:
- php: 7.2
env: EXECUTE_DEPLOYMENT=true
- php: 7.3
env: deps=low
env: EXECUTE_DEPLOYMENT=true
- php: 7.4
- php: 7.4
env: deps=low
fast_finish: true
before_install:
- phpenv config-rm xdebug.ini || echo "XDebug is not enabled"
Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ package: tools/box

cd build/phar && \
composer remove phpunit/phpunit --no-update && \
composer config platform.php 7.2 && \
composer config platform.php 7.3 && \
composer update --no-dev -o -a

tools/box compile
Expand All @@ -97,16 +97,16 @@ tools/deptrac:
curl -Ls http://get.sensiolabs.de/deptrac.phar -o tools/deptrac && chmod +x tools/deptrac

tools/infection: tools/infection.pubkey
curl -Ls https://github.com/infection/infection/releases/download/0.13.2/infection.phar -o tools/infection && chmod +x tools/infection
curl -Ls https://github.com/infection/infection/releases/download/0.16.1/infection.phar -o tools/infection && chmod +x tools/infection

tools/infection.pubkey:
curl -Ls https://github.com/infection/infection/releases/download/0.13.2/infection.phar.pubkey -o tools/infection.pubkey
curl -Ls https://github.com/infection/infection/releases/download/0.16.1/infection.phar.pubkey -o tools/infection.pubkey

tools/box:
curl -Ls https://github.com/humbug/box/releases/download/3.8.4/box.phar -o tools/box && chmod +x tools/box

tests/phar/tools/phpunit:
curl -Ls https://phar.phpunit.de/phpunit-8.phar -o tests/phar/tools/phpunit && chmod +x tests/phar/tools/phpunit
curl -Ls https://phar.phpunit.de/phpunit-9.phar -o tests/phar/tools/phpunit && chmod +x tests/phar/tools/phpunit

tests/phar/tools/phpunit.d/zalas-phpunit-doubles-extension.phar: build/zalas-phpunit-doubles-extension.phar
cp build/zalas-phpunit-doubles-extension.phar tests/phar/tools/phpunit.d/zalas-phpunit-doubles-extension.phar
Expand Down
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
"description": "Initialises test doubles in PHPUnit test cases for you",
"type": "library",
"require": {
"php": "^7.2,<8.0",
"phpunit/phpunit": "^8.5 || ^9.0",
"php": "^7.3,<8.0",
"phpunit/phpunit": "^9.1",
"phpdocumentor/reflection-docblock": "^4.0.1"
},
"require-dev": {
"phpspec/prophecy-phpunit": "dev-master"
},
"autoload": {
"psr-4": {
Expand Down
4 changes: 2 additions & 2 deletions manifest.xml.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?>
<phar xmlns="https://phar.io/xml/manifest/1.0">
<contains name="zalas/phpunit-doubles" version="@@version@@" type="extension">
<extension for="phpunit/phpunit" compatible="^8.0"/>
<extension for="phpunit/phpunit" compatible="^9.1"/>
</contains>

<copyright>
Expand All @@ -10,6 +10,6 @@
</copyright>

<requires>
<php version="^7.2"/>
<php version="^7.3"/>
</requires>
</phar>
2 changes: 2 additions & 0 deletions tests/TestCase/TestDoubles/Inheritance/InheritanceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@

namespace Zalas\PHPUnit\Doubles\Tests\TestCase\TestDoubles\Inheritance;

use Prophecy\PhpUnit\ProphecyTrait;
use Prophecy\Prophecy\ObjectProphecy;
use Zalas\PHPUnit\Doubles\TestCase\TestDoubles;
use Zalas\PHPUnit\Doubles\Tests\TestCase\TestDoubles\Fixtures\Fred;
use Zalas\PHPUnit\Doubles\Tests\TestCase\TestDoubles\Fixtures\Vimes;

class InheritanceTest extends BaseTestCase
{
use ProphecyTrait;
use TestDoubles;
use PropertyTrait;

Expand Down
2 changes: 2 additions & 0 deletions tests/TestCase/TestDoubles/MissingType/ProphecyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@
namespace Zalas\PHPUnit\Doubles\Tests\TestCase\TestDoubles\MissingType;

use PHPUnit\Framework\TestCase;
use Prophecy\PhpUnit\ProphecyTrait;
use Prophecy\Prophecy\ObjectProphecy;
use Zalas\PHPUnit\Doubles\TestCase\TestDoubles;

class ProphecyTest extends TestCase
{
use ProphecyTrait;
use TestDoubles;

/**
Expand Down
2 changes: 2 additions & 0 deletions tests/TestCase/TestDoubles/NotNull/ProphecyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
namespace Zalas\PHPUnit\Doubles\Tests\TestCase\TestDoubles\NotNull;

use PHPUnit\Framework\TestCase;
use Prophecy\PhpUnit\ProphecyTrait;
use Prophecy\Prophecy\ObjectProphecy;
use Zalas\PHPUnit\Doubles\TestCase\TestDoubles;
use Zalas\PHPUnit\Doubles\Tests\TestCase\TestDoubles\Fixtures\Copper;
Expand All @@ -12,6 +13,7 @@

class ProphecyTest extends TestCase
{
use ProphecyTrait;
use TestDoubles;

/**
Expand Down
2 changes: 2 additions & 0 deletions tests/TestCase/TestDoubles/ProphecyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
namespace Zalas\PHPUnit\Doubles\Tests\TestCase\TestDoubles;

use PHPUnit\Framework\TestCase;
use Prophecy\PhpUnit\ProphecyTrait;
use Prophecy\Prophecy\ObjectProphecy;
use Zalas\PHPUnit\Doubles\TestCase\TestDoubles;
use Zalas\PHPUnit\Doubles\Tests\TestCase\TestDoubles\Fixtures\Copper;
Expand All @@ -16,6 +17,7 @@

class ProphecyTest extends TestCase
{
use ProphecyTrait;
use TestDoubles;

/**
Expand Down

0 comments on commit 89d8c5a

Please sign in to comment.