-
-
Notifications
You must be signed in to change notification settings - Fork 43
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 php 8.4 #441
base: main
Are you sure you want to change the base?
support php 8.4 #441
Changes from 6 commits
9ab062e
243f892
b842228
8753828
1117755
f7a0080
5c5780f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,11 +9,11 @@ on: | |
|
||
jobs: | ||
build: | ||
runs-on: "ubuntu-22.04" | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
php-versions: [ '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3'] | ||
php-versions: [ '8.2', '8.3', '8.4'] | ||
coverage-driver: [ 'pcov' ] | ||
|
||
steps: | ||
|
@@ -23,7 +23,7 @@ jobs: | |
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-versions }} | ||
tools: composer:v2.2 | ||
tools: composer:v2.8 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.TOKEN_GITHUB }} | ||
|
||
|
@@ -32,7 +32,7 @@ jobs: | |
|
||
- name: Cache Composer packages | ||
id: composer-cache | ||
uses: actions/cache@v2 | ||
uses: actions/cache@v4 | ||
with: | ||
path: vendor | ||
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} | ||
|
@@ -52,22 +52,22 @@ jobs: | |
run: ./bin/phpunit -d memory_limit=-1 --coverage-clover clover.xml | ||
|
||
- name: Upload coverage to Codecov | ||
if: ${{ matrix.php-versions == '7.1' }} | ||
if: ${{ matrix.php-versions == '8.4' }} | ||
uses: codecov/codecov-action@v1 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
|
||
phar: | ||
runs-on: "ubuntu-20.04" | ||
runs-on: ubuntu-latest | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. would that mean when ubuntu gets upgraded we automatically get the latest version? If that the case an approach where we explicitly set the version is preferred imo |
||
needs: build | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Install PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: 7.1 | ||
tools: composer:v2.2 | ||
php-version: 8.4 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. shouldn't we use the smaller supported version (8.0)? |
||
tools: composer:v2.8 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.TOKEN_GITHUB }} | ||
|
||
|
@@ -84,19 +84,18 @@ jobs: | |
run: mv ./phparkitect.phar phparkitect-${{ github.sha }}.phar | ||
|
||
- name: "Upload phar file artifact" | ||
uses: actions/upload-artifact@v3 | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: phar-artifact | ||
path: ./phparkitect-${{ github.sha }}.phar | ||
retention-days: 1 | ||
|
||
smoke-test-phar: | ||
needs: phar | ||
runs-on: "ubuntu-20.04" | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
php-versions: [ '7.1', '7.2', '7.3', '7.4', '8.0', '8.1' ] | ||
coverage-driver: [ 'pcov' ] | ||
php-versions: [ '8.2', '8.3', '8.4' ] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same as above |
||
|
||
steps: | ||
- name: Install PHP | ||
|
@@ -107,7 +106,7 @@ jobs: | |
GITHUB_TOKEN: ${{ secrets.TOKEN_GITHUB }} | ||
|
||
- name: "Download phar ./phparkitect-${{ github.sha }}.phar" | ||
uses: actions/download-artifact@v3 | ||
uses: actions/download-artifact@v4 | ||
with: | ||
# will download phar in project root | ||
name: phar-artifact | ||
|
@@ -117,11 +116,11 @@ jobs: | |
|
||
publish_phar: | ||
needs: [build, smoke-test-phar] | ||
runs-on: "ubuntu-20.04" | ||
runs-on: ubuntu-latest | ||
if: github.event_name == 'release' | ||
steps: | ||
- name: "Download phar ./phparkitect-${{ github.sha }}.phar" | ||
uses: actions/download-artifact@v3 | ||
uses: actions/download-artifact@v4 | ||
with: | ||
# will download phar in project root | ||
name: phar-artifact | ||
|
@@ -136,7 +135,7 @@ jobs: | |
|
||
publish_docker_images: | ||
needs: [build, smoke-test-phar] | ||
runs-on: "ubuntu-20.04" | ||
runs-on: ubuntu-latest | ||
|
||
if: github.ref == 'refs/heads/main' || github.event_name == 'release' | ||
steps: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/vendor/ | ||
.phpunit.result.cache | ||
.phpunit.cache | ||
.idea | ||
.php_cs.cache | ||
.php-cs-fixer.cache | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
ARG PHP_VERSION=7.1 | ||
ARG PHP_VERSION=8.4 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why the version 8.4 and not the minor that we can support? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. for local testing with the last version There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. that should be the smaller supported version maybe? Like 8.0 🤔 |
||
|
||
FROM php:${PHP_VERSION}-cli-alpine AS php_build | ||
|
||
COPY --from=composer:2.0 /usr/bin/composer /usr/bin/composer | ||
COPY --from=composer:2.8 /usr/bin/composer /usr/bin/composer | ||
|
||
WORKDIR /arkitect | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,17 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/7.5/phpunit.xsd" | ||
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd" | ||
bootstrap="vendor/autoload.php" | ||
beStrictAboutCoversAnnotation="true" | ||
beStrictAboutOutputDuringTests="true" | ||
beStrictAboutTodoAnnotatedTests="true" | ||
verbose="true"> | ||
|
||
cacheDirectory=".phpunit.cache"> | ||
<testsuites> | ||
<testsuite name="default"> | ||
<directory>tests</directory> | ||
</testsuite> | ||
</testsuites> | ||
|
||
<filter> | ||
<whitelist processUncoveredFilesFromWhitelist="true"> | ||
<directory suffix=".php">src</directory> | ||
</whitelist> | ||
</filter> | ||
<source ignoreIndirectDeprecations="true" restrictNotices="true" restrictWarnings="true"> | ||
<include> | ||
<directory>src</directory> | ||
</include> | ||
</source> | ||
</phpunit> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we'd like to keep compatibility from php 8.0