Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support php8 for version 3.x #55

Merged
merged 2 commits into from
Dec 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,21 @@ env:
jobs:
tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php_version: [ 8.2, 8.1, 8.0, 7.4 ]
steps:
-
name: 'Check out the repo'
uses: actions/checkout@v2
uses: actions/checkout@v3
-
name: 'Docker login'
if: env.DOCKERHUB_TOKEN
run: 'docker login --username "$DOCKERHUB_USER" --password "$DOCKERHUB_TOKEN"'
-
name: 'Build image'
run: 'docker build -t $APP_IMAGE .'
run: 'docker build --build-arg PHP_VERSION=${{ matrix.php_version }} -t $APP_IMAGE .'
-
name: 'Run tests'
run: 'docker run ${{env.APP_IMAGE}} composer ci'
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
FROM php:7.4
ARG PHP_VERSION=7.4

FROM php:${PHP_VERSION:-7.4}-cli-buster

ARG DEBIAN_FRONTEND=noninteractive
ARG COMPOSER_FLAGS="--prefer-dist --no-interaction"
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"keboola/coding-standard": "^13.0",
"php-parallel-lint/php-parallel-lint": "^1.3",
"phpstan/phpstan": "^1.4",
"phpunit/phpunit": ">=7.5",
"phpunit/phpunit": ">=7.5 <=9.6",
"phpstan/phpdoc-parser": "1.5.*"
},
"scripts": {
Expand Down
18 changes: 18 additions & 0 deletions ignore-by-php-version.neon.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php

declare(strict_types=1);

use PHPStan\DependencyInjection\NeonAdapter;

$adapter = new NeonAdapter();

$config = [];
if (PHP_VERSION_ID >= 80000) {
$config = array_merge_recursive($config, $adapter->load(__DIR__ . '/phpstan-baseline-8+.neon'));
} else {
$config = array_merge_recursive($config, $adapter->load(__DIR__ . '/phpstan-baseline.neon'));
}

$config['parameters']['phpVersion'] = PHP_VERSION_ID;

return $config;
Loading