Skip to content

Commit

Permalink
PHP8 (#17)
Browse files Browse the repository at this point in the history
- PHP8 support
- dropped PHP <7.3 support
- symplify/easy-coding-standard replaced by squizlabs/php_codesniffer
- roave/security-advisories
- removed scrutinizer-ci
- cs fixes
  • Loading branch information
tigokr committed Jan 8, 2021
1 parent 72ea1c5 commit b5e86e8
Show file tree
Hide file tree
Showing 20 changed files with 1,922 additions and 3,270 deletions.
1 change: 1 addition & 0 deletions .gitignore
@@ -1,3 +1,4 @@
/.idea
/vendor
/coverage.xml
/.phpunit.result.cache
5 changes: 2 additions & 3 deletions .travis.yml
@@ -1,9 +1,8 @@
language: php
php:
- '7.1'
- '7.2'
- '7.3'
- '7.4'
- '8.0'

branches:
only:
Expand All @@ -13,7 +12,7 @@ install:
- composer install --dev

script:
- vendor/bin/ecs --level psr12 check src
- vendor/bin/phpcs -p --standard=PSR12 src
- vendor/bin/phpstan analyse
- vendor/bin/phpunit
- php check-coverage.php coverage.xml 100
Expand Down
16 changes: 12 additions & 4 deletions Makefile
@@ -1,10 +1,15 @@
docker:=docker run --rm -u=$(shell id -u):$(shell id -g) -v $(CURDIR):/app -w /app elegant-bro/arrayee:7.4
default_php_version:=7.4
php_version:=$(PHP_VERSION)
ifndef PHP_VERSION
php_version:=$(default_php_version)
endif
docker:=docker run --rm -u=$(shell id -u):$(shell id -g) -v $(CURDIR):/app -w /app elegant-bro/arrayee:$(php_version)

build:
docker build --build-arg VERSION=7.4 --tag elegant-bro/arrayee:7.4 ./docker/
docker build --build-arg VERSION=$(php_version) --tag elegant-bro/arrayee:$(php_version) ./docker/

exec:
docker run --rm -ti -u=$(shell id -u):$(shell id -g) -v $(CURDIR):/app:rw -w /app elegant-bro/arrayee:7.4 sh
docker run --rm -ti -u=$(shell id -u):$(shell id -g) -v $(CURDIR):/app:rw -w /app elegant-bro/arrayee:$(php_version) sh

install:
$(docker) composer install
Expand All @@ -13,7 +18,10 @@ install-no-dev:
$(docker) composer install --no-dev

style-check:
$(docker) vendor/bin/ecs --level psr12 check src
$(docker) vendor/bin/phpcs -p --standard=PSR12 src

style-fix:
$(docker) vendor/bin/phpcbf -p --standard=PSR12 src

unit:
$(docker) -dzend_extension=xdebug.so -dxdebug.mode=coverage vendor/bin/phpunit
Expand Down
10 changes: 4 additions & 6 deletions composer.json
Expand Up @@ -18,7 +18,7 @@
}
],
"require": {
"php": ">=7.1",
"php": ">=7.3",
"ext-json": "*",
"elegant-bro/interfaces": "^1.0"
},
Expand All @@ -27,8 +27,9 @@
"php-coveralls/php-coveralls": "^2.4",
"phpstan/phpstan": "^0.12.64",
"phpstan/phpstan-phpunit": "^0.12.17",
"phpunit/phpunit": "^5.7 || ^6.4 || ^7.0",
"symplify/easy-coding-standard": "^6.0"
"phpunit/phpunit": "^9.5",
"roave/security-advisories": "dev-latest",
"squizlabs/php_codesniffer": "^3.5"
},
"autoload": {
"psr-4": {
Expand All @@ -41,9 +42,6 @@
}
},
"config": {
"platform": {
"php": "7.1.27"
},
"preferred-install": {
"*": "dist"
},
Expand Down

0 comments on commit b5e86e8

Please sign in to comment.