Skip to content

CI: use PHP 8.x #440

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

Merged
merged 2 commits into from
May 15, 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: 0 additions & 8 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,3 @@ updates:
schedule:
interval: daily
open-pull-requests-limit: 10
ignore:
- dependency-name: phpstan/phpstan
versions:
- 0.12.70
- 0.12.77
- 0.12.78
- 0.12.79
- 0.12.83
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
php-version: 8.1
ini-values: assert.exception=1, phar.readonly=0, zend.assertions=1
extensions: curl, json, phar, mbstring, gzip, bzip2, openssl
tools: pecl, phing
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ jobs:
key: cache-v1 # can be any string, change to clear the extension cache.
strategy:
matrix:
php-versions: ['7.4', '8.0', '8.1']
php-versions: ['8.1', '8.2']
experimental: [ false ]
include:
- php-versions: 8.2
- php-versions: 8.3
experimental: true
steps:
- name: Checkout
Expand Down Expand Up @@ -76,7 +76,7 @@ jobs:
run: ./vendor/phpunit/phpunit/phpunit --configuration tests/phpunit.xml --coverage-clover=coverage.xml --exclude-group twig

- name: PHPStan
run: ./vendor/phpstan/phpstan/phpstan analyse --level=5 src/
run: ./vendor/phpstan/phpstan/phpstan analyse --level=6 src/

- name: PHPCS
run: phpcs --standard=tests/phpcs.xml --ignore=\*Minifier.php src/ | cs2pr
Expand All @@ -97,7 +97,7 @@ jobs:
key: cache-v1 # can be any string, change to clear the extension cache.
strategy:
matrix:
php-versions: ['8.1']
php-versions: ['8.2']
steps:
- name: Checkout
uses: actions/checkout@v2
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM apiaryio/drafter:latest as drafter
FROM composer:latest as composer

FROM php:7.4-cli-alpine as build
FROM php:8.1-cli-alpine as build
RUN apk add --no-cache \
$PHPIZE_DEPS \
openssl-dev
Expand All @@ -15,7 +15,7 @@ RUN /usr/bin/composer install
RUN vendor/bin/phing phar-nightly
COPY build/out/phpdraft-nightly.phar /usr/local/bin/phpdraft

FROM php:7.4-cli-alpine
FROM php:8.1-cli-alpine
LABEL maintainer="Sean Molenaar sean@seanmolenaar.eu"
RUN apk add --no-cache gcc
COPY --from=drafter /usr/local/bin/drafter /usr/local/bin/drafter
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This is a parser for API Blueprint files in PHP.[1](#dependencies)
PHPDraft requires [drafter](https://github.com/apiaryio/drafter) to be installed. Refer to the drafter page for the installation details. If you don't want to install drafter, you can pass `-o` to the command to make it use [https://api.apiblueprint.org/parser](https://api.apiblueprint.org/parser)

## Usage
Requires PHP 7.0+ to run. Unittests require runkit or uopz
Requires PHP 8.1+ to run. Unittests require runkit or uopz
For direct usage you can run:
```bash
$ ./phpdraft.phar -f blueprint-file.apib > blueprint-webpage.html
Expand Down
2 changes: 1 addition & 1 deletion build.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="PHPDraft" default="setup">
<target name="setup" depends="clean"/>
<property name="min-php-version" value="7.4.0"/>
<property name="min-php-version" value="8.1.0"/>

<target name="clean" unless="clean.done" description="Cleanup build artifacts">
<delete dir="${project.basedir}/build/coverage"/>
Expand Down
16 changes: 12 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
}
],
"require": {
"php": "^7.4||^8.0",
"php": "^8.1",
"ql/uri-template": "~1.0",
"vanilla/garden-cli": "~3.0",
"vanilla/garden-cli": "~4.0",
"michelf/php-markdown": "~2.0",
"lukasoppermann/http-status": "~3.1",
"ext-json": "*",
Expand All @@ -31,11 +31,14 @@
},
"require-dev": {
"lunr/halo": "dev-master",
"phpunit/phpunit": "~9.0",
"phpunit/phpunit": "~9.6",
"theseer/autoload": "~1.0",
"phing/phing": "~2.0",
"phpstan/phpstan": "^1.2.0",
"phpstan/phpstan-phpunit": "^1.0.0"
"phpstan/phpstan-phpunit": "^1.0.0",
"phpstan/phpstan-strict-rules": "^1.5",
"phpstan/extension-installer": "^1.3",
"phpstan/phpstan-deprecation-rules": "^1.1"
},
"autoload": {
"psr-4": { "PHPDraft\\": "src/PHPDraft" }
Expand All @@ -44,5 +47,10 @@
"classmap": [
"tests/"
]
},
"config": {
"allow-plugins": {
"phpstan/extension-installer": true
}
}
}
Loading