Skip to content
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
33 changes: 33 additions & 0 deletions .github/actions/downgrade-code/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: 'Downgrade code'
description: 'Downgrade code'
inputs:
php-version:
description: 'Original PHP version'
required: true
runs:
using: "composite"
steps:

- name: "Change to simple-downgrade PHP version"
if: inputs.php-version == '7.4' || inputs.php-version == '8.0' || inputs.php-version == '8.1'
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
php-version: "8.4"

- name: "Transform source code"
if: inputs.php-version == '7.4' || inputs.php-version == '8.0' || inputs.php-version == '8.1'
shell: bash
run: |
composer install --no-interaction --no-progress --working-dir=compiler
./compiler/vendor/bin/simple-downgrade downgrade -c build/downgrade.php ${{ inputs.php-version }}
composer dump

- name: "Re-store PHP version"
if: inputs.php-version == '7.4' || inputs.php-version == '8.0' || inputs.php-version == '8.1'
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
php-version: "${{ inputs.php-version }}"
ini-file: development
extensions: ds,mbstring
19 changes: 1 addition & 18 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,25 +46,8 @@ jobs:

- uses: "ramsey/composer-install@v3"

- name: "Change to simple-downgrade PHP version"
if: matrix.php-version == '7.4' || matrix.php-version == '8.0' || matrix.php-version == '8.1'
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
php-version: "8.4"

- name: "Transform source code"
if: matrix.php-version == '7.4' || matrix.php-version == '8.0' || matrix.php-version == '8.1'
run: |
composer install --no-interaction --no-progress --working-dir=compiler
./compiler/vendor/bin/simple-downgrade downgrade -c build/downgrade.php ${{ matrix.php-version }}
composer dump

- name: "Re-store PHP version"
if: matrix.php-version == '7.4' || matrix.php-version == '8.0' || matrix.php-version == '8.1'
uses: "shivammathur/setup-php@v2"
- uses: ./.github/actions/downgrade-code
with:
coverage: "none"
php-version: "${{ matrix.php-version }}"

- name: "Validate Composer"
Expand Down
24 changes: 1 addition & 23 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,31 +56,9 @@ jobs:

- uses: "ramsey/composer-install@v3"

- name: "Change to simple-downgrade PHP version"
if: matrix.php-version == '7.4' || matrix.php-version == '8.0' || matrix.php-version == '8.1'
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
php-version: "8.4"
ini-file: development
extensions: mbstring

- name: "Transform source code"
if: matrix.php-version == '7.4' || matrix.php-version == '8.0' || matrix.php-version == '8.1'
shell: bash
run: |
composer install --no-interaction --no-progress --working-dir=compiler
./compiler/vendor/bin/simple-downgrade downgrade -c build/downgrade.php ${{ matrix.php-version }}
composer dump

- name: "Re-store PHP version"
if: matrix.php-version == '7.4' || matrix.php-version == '8.0' || matrix.php-version == '8.1'
uses: "shivammathur/setup-php@v2"
- uses: ./.github/actions/downgrade-code
with:
coverage: "none"
php-version: "${{ matrix.php-version }}"
ini-file: development
extensions: mbstring

- name: "PHPStan"
run: "make phpstan"
Expand Down
27 changes: 1 addition & 26 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -191,34 +191,9 @@ jobs:
shell: bash
run: "composer require --dev phpunit/phpunit:^9.6 brianium/paratest:^6.5 symfony/console:^5.4 symfony/process:^5.4 --update-with-dependencies --ignore-platform-reqs --working-dir=tests"

- name: "Change to simple-downgrade PHP version"
if: matrix.php-version == '7.4' || matrix.php-version == '8.0' || matrix.php-version == '8.1'
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
php-version: "8.4"
tools: pecl
extensions: ds,mbstring
ini-file: development
ini-values: memory_limit=2G

- name: "Transform source code"
shell: bash
run: |
composer install --no-interaction --no-progress --working-dir=compiler
./compiler/vendor/bin/simple-downgrade downgrade -c build/downgrade.php ${{ matrix.php-version }}
composer dump

- name: "Re-store PHP version"
if: matrix.php-version == '7.4' || matrix.php-version == '8.0' || matrix.php-version == '8.1'
uses: "shivammathur/setup-php@v2"
- uses: ./.github/actions/downgrade-code
with:
coverage: "none"
php-version: "${{ matrix.php-version }}"
tools: pecl
extensions: ds,mbstring
ini-file: development
ini-values: memory_limit=2G

- name: "Tests"
run: "make tests"
Loading