Skip to content

Commit

Permalink
Merge pull request #55 from keboola/ondra-php82-for-v3
Browse files Browse the repository at this point in the history
Support php8 for version 3.x
  • Loading branch information
ondrajodas authored Dec 8, 2023
2 parents ea1e00e + 7079eb7 commit 4d7785e
Show file tree
Hide file tree
Showing 9 changed files with 568 additions and 9 deletions.
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

0 comments on commit 4d7785e

Please sign in to comment.