Skip to content

Commit a08d2ad

Browse files
Add PHP 8 support (#3)
1 parent a1c869e commit a08d2ad

File tree

5 files changed

+33
-27
lines changed

5 files changed

+33
-27
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/.php_cs
22
/.php_cs.cache
3+
/.phpunit.result.cache
34
/composer.lock
45
/phpunit.xml
56
/vendor/

.travis.yml

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
language: php
22

3-
sudo: false
4-
53
git:
64
depth: 1
75

@@ -18,14 +16,14 @@ before_install:
1816
# turn off XDebug
1917
- phpenv config-rm xdebug.ini || return 0
2018

21-
# Composer: boost installation
22-
- composer global show -ND 2>&1 | grep "hirak/prestissimo" || travis_retry composer global require $DEFAULT_COMPOSER_FLAGS hirak/prestissimo
19+
# Composer v2
20+
- composer self-update --2
2321

2422
jobs:
2523
include:
2624
-
2725
stage: Static Code Analysis
28-
php: 7.1
26+
php: 7.4
2927
env: COMPOSER_FLAGS="--no-dev --prefer-stable"
3028
install:
3129
- travis_retry composer update -d dev-tools $DEFAULT_COMPOSER_FLAGS
@@ -38,39 +36,50 @@ jobs:
3836
- ./dev-tools/vendor/bin/phpmd src,tests text phpmd.xml || travis_terminate 1
3937
- ./dev-tools/vendor/bin/composer-require-checker check composer.json || travis_terminate 1
4038
- ./dev-tools/vendor/bin/php-cs-fixer fix -v
39+
dist: xenial
4140

4241
- &STANDARD_TEST_JOB
4342
stage: Test
44-
php: 5.4
43+
php: 5.6
4544
install:
4645
- travis_retry composer update $DEFAULT_COMPOSER_FLAGS $COMPOSER_FLAGS
4746
- composer info -D | sort
4847
script:
49-
- vendor/bin/phpunit --verbose
48+
- vendor/bin/simple-phpunit
49+
dist: xenial
5050

5151
-
5252
<<: *STANDARD_TEST_JOB
53-
php: 5.3
53+
php: 5.6
5454
env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest"
55-
dist: precise
55+
dist: xenial
5656

5757
-
5858
<<: *STANDARD_TEST_JOB
59-
php: 5.5
59+
php: 7.0
6060

6161
-
6262
<<: *STANDARD_TEST_JOB
63-
php: 5.6
63+
php: 7.1
64+
dist: bionic
6465

6566
-
6667
<<: *STANDARD_TEST_JOB
67-
php: 7.0
68+
php: 7.2
69+
dist: bionic
6870

6971
-
7072
<<: *STANDARD_TEST_JOB
71-
php: 7.1
73+
php: 7.3
74+
dist: bionic
75+
76+
-
77+
<<: *STANDARD_TEST_JOB
78+
php: 7.4
79+
dist: bionic
7280

7381
-
7482
<<: *STANDARD_TEST_JOB
7583
php: nightly
7684
env: SYMFONY_DEPRECATIONS_HELPER=weak
85+
dist: bionic

composer.json

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,10 @@
1414
}
1515
],
1616
"require": {
17-
"php": "^5.3 || ^7.0"
17+
"php": "^5.6 || ^7.0 || ^8.0"
1818
},
1919
"require-dev": {
20-
"phpunit/phpunit": "^4.8.35 || ^5.4.3",
21-
"symfony/phpunit-bridge": "^3.2.2"
22-
},
23-
"conflict": {
24-
"hhvm": "*"
20+
"symfony/phpunit-bridge": "^5.1"
2521
},
2622
"config": {
2723
"optimize-autoloader": true,

dev-tools/composer.json

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
11
{
22
"require": {
3-
"php": "^7.0"
3+
"php": "^7.4"
44
},
55
"require-dev": {
6-
"friendsofphp/php-cs-fixer": "^2.4",
7-
"maglnet/composer-require-checker": "^0.1.5",
8-
"mi-schi/phpmd-extension": "^4.2",
6+
"friendsofphp/php-cs-fixer": "^2.16.4",
7+
"maglnet/composer-require-checker": "^2.1.1@dev",
8+
"mi-schi/phpmd-extension": "^4.3",
99
"phpmd/phpmd": "^2.6"
1010
},
11-
"conflict": {
12-
"hhvm": "*"
13-
},
1411
"config": {
1512
"optimize-autoloader": true,
1613
"sort-packages": true

tests/AccessibleObjectTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,10 @@ final class AccessibleObjectTest extends TestCase
2727
{
2828
protected $accessibleObject;
2929

30-
protected function setUp()
30+
/**
31+
* @before
32+
*/
33+
public function setUpProperty()
3134
{
3235
$this->accessibleObject = new AccessibleObject(new DummyClass());
3336
}

0 commit comments

Comments
 (0)