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

v0.12.0 : Only support to php ^8.0 #692

Draft
wants to merge 17 commits into
base: master
Choose a base branch
from
Draft
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
2 changes: 0 additions & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
/.editorconfig export-ignore
/.travis.yml export-ignore
/appveyor.yml export-ignore
/psalm.baseline.xml export-ignore
/psalm.xml export-ignore
/bin export-ignore
/doc export-ignore
/docker export-ignore
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/bc-break.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
name: Roave

on:
workflow_call:
inputs:
LAST_VERSION:
type: string
required: true

jobs:
roave_bc_check:
name: BC Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ inputs.LAST_VERSION }}
- name: Composer install
run: composer require --dev roave/backward-compatibility-check
- name: Roave BC Check
run: vendor/bin/roave-backward-compatibility-check --format=github-actions
10 changes: 0 additions & 10 deletions .github/workflows/bc.yml

This file was deleted.

76 changes: 0 additions & 76 deletions .github/workflows/ci.yml

This file was deleted.

46 changes: 16 additions & 30 deletions .github/workflows/static.yml → .github/workflows/linter.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,27 @@
on: [push, pull_request]
name: Static analysis
---
name: Linters

on:
workflow_call:
inputs:
PHP_VERSIONS:
type: string
required: true

jobs:

phpstan:
name: PHPStan
runs-on: ubuntu-latest
strategy:
matrix:
php: ${{ fromJson(inputs.PHP_VERSIONS) }}

steps:
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
php-version: ${{ matrix.php }}
extensions: mongo, mbstring, fileinfo
tools: composer:v2

Expand All @@ -20,7 +31,7 @@ jobs:
- name: Download dependencies
run: |
make require-all
composer require --dev --no-update phpstan/phpstan:1.8.8
composer require --dev --no-update phpstan/phpstan:1.10.39
composer update --no-interaction --prefer-dist

- name: PHPStan
Expand All @@ -37,7 +48,7 @@ jobs:
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
php-version: ${{ fromJson(inputs.PHP_VERSIONS)[0] }}
extensions: mongo, mbstring, fileinfo
tools: composer:v2

Expand All @@ -53,28 +64,3 @@ jobs:
run: |
./vendor/bin/php-cs-fixer --version
./vendor/bin/php-cs-fixer fix --diff --dry-run --show-progress=none

psalm:
name: Psalm
runs-on: ubuntu-latest
steps:
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
extensions: mongo, mbstring, fileinfo
tools: composer:v2

- name: Checkout code
uses: actions/checkout@v2

- name: Download dependencies
run: |
make require-all
composer require --dev --no-update psalm/phar:3.16
composer update --no-interaction --prefer-dist

- name: Psalm
run: |
./vendor/bin/psalm.phar --version
./vendor/bin/psalm.phar --output-format=github --no-progress --show-info=false --stats
25 changes: 25 additions & 0 deletions .github/workflows/pull-request.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
name: Pull-Request

on: pull_request

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
bc-break:
uses: ./.github/workflows/bc-break.yaml
with:
LAST_VERSION: '8.2'

test:
uses: ./.github/workflows/test.yaml
with:
PHP_VERSIONS: '["8.0", "8.1", "8.2"]'
LAST_VERSION: '8.2'

linter:
uses: ./.github/workflows/linter.yaml
with:
PHP_VERSIONS: '["8.0", "8.1", "8.2"]'
28 changes: 28 additions & 0 deletions .github/workflows/push.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
name: Push

on:
push:
branches:
- master

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false

jobs:
bc-break:
uses: ./.github/workflows/bc-break.yaml
with:
LAST_VERSION: '8.2'

test:
uses: ./.github/workflows/test.yaml
with:
PHP_VERSIONS: '["8.0", "8.1", "8.2"]'
LAST_VERSION: '8.2'

linter:
uses: ./.github/workflows/linter.yaml
with:
PHP_VERSIONS: '["8.0", "8.1", "8.2"]'
84 changes: 84 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
---
name: Tests

on:
workflow_call:
inputs:
PHP_VERSIONS:
type: string
required: true
LAST_VERSION:
type: string
required: true

jobs:

build:
name: Build
runs-on: ubuntu-latest
strategy:
matrix:
php: ${{ fromJson(inputs.PHP_VERSIONS) }}

steps:
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: none
tools: flex

- name: Checkout code
uses: actions/checkout@v2

- name: Download dependencies
run: |
composer update --no-interaction --prefer-dist --optimize-autoloader --prefer-stable

- name: Remove PHPSpec adapter tests
run: make remove-phpspec

- name: PHPSpec
run: php vendor/bin/phpspec run -fpretty --verbose

- name: PHPUnit
run: php vendor/bin/phpunit

adapter:
name: Adapter
runs-on: ubuntu-latest
strategy:
matrix:
include:
- { php: '${{ inputs.LAST_VERSION }}', package: 'async-aws/simple-s3:^1.0', phpspec: 'spec/Gaufrette/Adapter/AsyncAwsS3Spec.php' }
- { php: '${{ inputs.LAST_VERSION }}', package: 'aws/aws-sdk-php:^3.158', phpspec: 'spec/Gaufrette/Adapter/AwsS3Spec.php' }
- { php: '${{ inputs.LAST_VERSION }}', package: 'google/apiclient:^2.12', phpspec: 'spec/Gaufrette/Adapter/GoogleCloudStorageSpec.php' }
- { php: '${{ inputs.LAST_VERSION }}', package: 'doctrine/dbal:^2.3', phpspec: 'spec/Gaufrette/Adapter/DoctrineDbalSpec.php' }
- { php: '${{ inputs.LAST_VERSION }}', package: 'doctrine/dbal:^3.4', phpspec: 'spec/Gaufrette/Adapter/DoctrineDbalSpec.php' }
- { php: '${{ inputs.LAST_VERSION }}', package: 'league/flysystem:^1.0', phpspec: 'spec/Gaufrette/Adapter/FlysystemSpec.php' }
- { php: '${{ inputs.LAST_VERSION }}', package: 'microsoft/azure-storage-blob:^1.0', phpspec: 'spec/Gaufrette/Adapter/AzureBlobStore' }
- { php: '${{ inputs.LAST_VERSION }}', package: 'mongodb/mongodb:^1.1', phpspec: 'spec/Gaufrette/Adapter/GridFSSpec.php' }
- { php: '${{ inputs.LAST_VERSION }}', package: 'phpseclib/phpseclib:^2.0', phpspec: 'spec/Gaufrette/Adapter/PhpseclibSftpSpec.php' }

steps:
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: none
tools: flex

- name: Checkout code
uses: actions/checkout@v2

- name: Download dependencies
run: |
composer req ${{ matrix.package }} --no-update
composer update --no-interaction --prefer-dist --optimize-autoloader --prefer-stable

- name: PHPSpec
if: ${{ matrix.phpspec }}
run: php vendor/bin/phpspec run -fpretty --verbose ${{ matrix.phpspec }}

- name: PHPUnit
run: php vendor/bin/phpunit
46 changes: 0 additions & 46 deletions .travis.yml

This file was deleted.

Loading
Loading