Skip to content
This repository has been archived by the owner on Nov 21, 2021. It is now read-only.

Commit

Permalink
add support for php 8 (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
dmaicher authored Nov 9, 2020
1 parent b73fd4e commit 24801ed
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 15 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
.php_cs.cache
.phpunit.result.cache
composer.lock
php-cs-fixer.phar
12 changes: 8 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,27 +10,31 @@ php:

env:
- SYMFONY_REQUIRE="4.4.*"
- SYMFONY_REQUIRE="5.0.*"
- SYMFONY_REQUIRE="5.1.*"

matrix:
include:
- php: 7.1
env:
- SYMFONY_REQUIRE="4.4.*"
- SOLARIUM_REQUIRE="^5.2"
- CS_FIXER=1

- php: 7.4
- php: nightly
env:
- SYMFONY_REQUIRE="5.1.*"
- STABILITY=dev

before_install:
- phpenv config-rm xdebug.ini || echo "xDebug not disabled"
- composer global require --no-progress --no-scripts --no-plugins symfony/flex

install:
- rm -rf composer.lock vendor/*
- if [[ ${STABILITY} ]]; then composer config minimum-stability ${STABILITY}; fi;
- if [[ ${SOLARIUM_REQUIRE} ]]; then composer req solarium/solarium $SOLARIUM_REQUIRE; fi
- composer update
- composer update --prefer-dist

script:
- make build
- if [[ ${CS_FIXER} == "1" ]]; then make php_cs_fixer_check; fi
- make build
12 changes: 6 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@
"sort-packages": true
},
"require": {
"php": "^7.1",
"php": "^7.1 || ^8.0",
"solarium/solarium": "^5.2 || ^6.0",
"symfony/framework-bundle": "^4.4 || ^5.0"
"symfony/framework-bundle": "^4.4 || ^5.1"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^2.16",
"phpstan/phpstan": "^0.12.19",
"phpunit/phpunit": "^7.5 || ^8.5",
"symfony/phpunit-bridge": "^5.0"
"phpstan/phpstan": "^0.12",
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.4",
"symfony/phpunit-bridge": "^5.1",
"symfony/stopwatch": "^4.4 || ^5.1"
},
"autoload": {
"psr-4": {
Expand Down
13 changes: 8 additions & 5 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@ test:
phpstan:
vendor/bin/phpstan analyse -c phpstan.neon -a vendor/autoload.php -l 5 src tests

build: test phpstan php_cs_fixer_check
build: test phpstan

php_cs_fixer_fix:
vendor/bin/php-cs-fixer fix --config .php_cs src tests
php_cs_fixer_fix: php-cs-fixer.phar
./php-cs-fixer.phar fix --config .php_cs src tests

php_cs_fixer_check:
vendor/bin/php-cs-fixer fix --config .php_cs src tests --dry-run
php_cs_fixer_check: php-cs-fixer.phar
./php-cs-fixer.phar fix --config .php_cs src tests --dry-run --diff --diff-format=udiff

php-cs-fixer.phar:
wget https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v2.16.6/php-cs-fixer.phar && chmod 777 php-cs-fixer.phar

0 comments on commit 24801ed

Please sign in to comment.