Skip to content

Commit da80602

Browse files
authored
Merge pull request #49 from facile-it/feature/php74
PHP 7.4 support
2 parents 69bdd1d + 2d0b3d9 commit da80602

11 files changed

+16
-21
lines changed

.travis.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,22 @@ matrix:
99
- php: 7.1
1010
env:
1111
- DEPS_LOWEST=1
12-
- php: 7.2
12+
- php: 7.4
1313
env:
1414
- COVERAGE=1
15+
- PHPSTAN=1
1516
- php: nightly
1617
fast_finish: true
1718
allow_failures:
1819
- php: nightly
1920

2021
install:
21-
- phpenv config-rm xdebug.ini
22+
- phpenv config-rm xdebug.ini || true
2223
- if [[ ${DEPS_LOWEST} == 1 ]]; then composer update --prefer-dist --prefer-stable --prefer-lowest --no-interaction; fi
2324
- if [[ ${DEPS_LOWEST} != 1 ]]; then composer update --prefer-source --no-interaction; fi
2425

2526
script:
27+
- if [[ ${PHPSTAN} == 1 ]]; then ./vendor/bin/phpstan analyse --level 1 ./src/ ./tests/; fi
2628
- if [[ ${COVERAGE} == 1 ]]; then phpdbg -qrr ./vendor/bin/phpunit --coverage-clover ./build/logs/clover.xml; else ./vendor/bin/phpunit; fi
2729

2830
after_success:

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class FooTest extends \AnyTestCase
3434
{
3535
private $foo;
3636

37-
protected function setUp()
37+
protected function setUp(): void
3838
{
3939
Moka::clean();
4040

@@ -73,7 +73,7 @@ class FooTest extends TestCase
7373
{
7474
use MokaCleanerTrait;
7575

76-
protected function setUp()
76+
protected function setUp(): void
7777
{
7878
// No call to Moka::clean() needed.
7979

composer.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -47,16 +47,16 @@
4747
}
4848
},
4949
"require": {
50-
"php": ">=7.1",
50+
"php": "^7.1",
5151
"phpcollection/phpcollection": "^0.5",
5252
"phpunit/phpunit": "^7.0",
5353
"psr/container": "^1.0"
5454
},
5555
"require-dev": {
56-
"friendsofphp/php-cs-fixer": "^2.3",
56+
"friendsofphp/php-cs-fixer": "^2.16",
5757
"mockery/mockery": "^1.0",
5858
"phake/phake": "^3.0",
59-
"phpspec/prophecy": "^1.0",
59+
"phpspec/prophecy": "^1.7",
6060
"phpstan/phpstan": "^0.12.8"
6161
},
6262
"suggest": {

src/Tests/MokaMockingStrategyTestCase.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ abstract class MokaMockingStrategyTestCase extends TestCase
3232
/**
3333
* @return void
3434
*/
35-
protected function setUp()
35+
protected function setUp(): void
3636
{
3737
$this->namesWithValues = [
3838
'$property' => mt_rand(),

tests/Builder/ProxyBuilderTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public function testGetProxySuccessWithSameAliasOnly()
6363
$this->assertSame($proxy, $this->proxyBuilder->getProxy('bar'));
6464
}
6565

66-
protected function setUp()
66+
protected function setUp(): void
6767
{
6868
$this->mockingStrategy = $this->getMockBuilder(MockingStrategyInterface::class)
6969
->disableOriginalConstructor()

tests/Generator/ProxyGeneratorTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class ProxyGeneratorTest extends TestCase
1717
*/
1818
private $proxyGenerator;
1919

20-
public function setUp()
20+
public function setUp(): void
2121
{
2222
$mock = $this->getMockBuilder(FooTestClass::class)
2323
->disableOriginalConstructor()

tests/MokaTest.php

-7
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,6 @@ public function testCallStaticSuccess()
3232
}
3333
}
3434

35-
public function testCallStaticFailure()
36-
{
37-
$this->expectException(NotImplementedException::class);
38-
39-
Moka::foo(\stdClass::class);
40-
}
41-
4235
public function testPHPUnitExpectation()
4336
{
4437
/** @var ProxyTrait $proxy */

tests/Plugin/Phake/Matcher/FirstStubMatcherTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class FirstStubMatcherTest extends TestCase
2525
*/
2626
private $arguments = [];
2727

28-
protected function setUp()
28+
protected function setUp(): void
2929
{
3030
$this->mock = $this->getMockBuilder(PhakeMock::class)
3131
->disableOriginalConstructor()

tests/Proxy/ProxyContainerTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class ProxyContainerTest extends TestCase
2020
*/
2121
private $proxy;
2222

23-
protected function setUp()
23+
protected function setUp(): void
2424
{
2525
$this->proxyContainer = new ProxyContainer();
2626
/** @var ProxyInterface $proxy */

tests/Proxy/ProxyTraitTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class ProxyTraitTest extends TestCase
2626
*/
2727
private $mock;
2828

29-
protected function setUp()
29+
protected function setUp(): void
3030
{
3131
$this->proxy = new TestProxy();
3232

tests/Stub/StubSetTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class StubSetTest extends TestCase
1515
*/
1616
private $set;
1717

18-
protected function setUp()
18+
protected function setUp(): void
1919
{
2020
$this->set = new StubSet();
2121
}

0 commit comments

Comments
 (0)