-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #31 from b24io/feature/27-downgrade-v3-to-php-74
Feature/27 downgrade v3 to php 74
- Loading branch information
Showing
120 changed files
with
3,282 additions
and
376 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
name: "Integration tests" | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- v3 | ||
push: | ||
branches: | ||
- v3 | ||
|
||
env: | ||
COMPOSER_FLAGS: "--ansi --no-interaction --no-progress --prefer-dist" | ||
LOYALTY_API_ENDPOINT_URL: ${{ vars.LOYALTY_API_ENDPOINT_URL }} | ||
LOYALTY_API_CLIENT_ID: ${{ secrets.LOYALTY_API_CLIENT_ID }} | ||
LOYALTY_API_ADMIN_KEY: ${{ secrets.LOYALTY_API_ADMIN_KEY }} | ||
|
||
jobs: | ||
tests: | ||
name: "Integration tests" | ||
runs-on: ${{ matrix.operating-system }} | ||
environment: integration-tests | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
php-version: | ||
- "7.4" | ||
dependencies: [ highest ] | ||
operating-system: [ ubuntu-latest, windows-latest ] | ||
|
||
steps: | ||
|
||
- name: "Checkout" | ||
uses: "actions/checkout@v2" | ||
|
||
- name: "Install PHP" | ||
uses: shivammathur/setup-php@2.30.4 | ||
with: | ||
coverage: xdebug | ||
extensions: mbstring, intl, json, bcmath, curl | ||
php-version: "${{ matrix.php-version }}" | ||
ini-values: variables_order=EGPCS | ||
|
||
- name: "Install dependencies" | ||
run: | | ||
composer update ${{ env.COMPOSER_FLAGS }} | ||
- name: "Debug ENV variables" | ||
run: | | ||
printenv | ||
- name: "Run integration tests" | ||
run: | | ||
php vendor/bin/phpunit --colors=always --testsuite integration-tests | ||
- name: "integration tests succeeded" | ||
if: ${{ success() }} | ||
run: | | ||
echo '✅ integration tests pass, congratulations!' | ||
- name: "integration tests failed" | ||
if: ${{ failure() }} | ||
run: | | ||
echo '::error:: ❗integration tests failed (╯°益°)╯彡┻━┻ ' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: "Integration tests" | ||
|
||
on: | ||
push: | ||
branches: | ||
- v4 | ||
- master | ||
|
||
env: | ||
COMPOSER_FLAGS: "--ansi --no-interaction --no-progress --prefer-dist" | ||
LOYALTY_API_ENDPOINT_URL: ${{ vars.LOYALTY_API_ENDPOINT_URL }} | ||
LOYALTY_API_CLIENT_ID: ${{ secrets.LOYALTY_API_CLIENT_ID }} | ||
LOYALTY_API_ADMIN_KEY: ${{ secrets.LOYALTY_API_ADMIN_KEY }} | ||
|
||
jobs: | ||
tests: | ||
name: "Integration tests" | ||
runs-on: ${{ matrix.operating-system }} | ||
environment: integration-tests | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
php-version: | ||
- "8.2" | ||
- "8.3" | ||
dependencies: [ highest ] | ||
operating-system: [ ubuntu-latest, windows-latest ] | ||
|
||
steps: | ||
|
||
- name: "Checkout" | ||
uses: "actions/checkout@v2" | ||
|
||
- name: "Install PHP" | ||
uses: shivammathur/setup-php@2.30.4 | ||
with: | ||
coverage: xdebug | ||
extensions: mbstring, intl, json, bcmath, curl | ||
php-version: "${{ matrix.php-version }}" | ||
ini-values: variables_order=EGPCS | ||
|
||
- name: "Install dependencies" | ||
run: | | ||
composer update ${{ env.COMPOSER_FLAGS }} | ||
- name: "Debug ENV variables" | ||
run: | | ||
printenv | ||
- name: "Run integration tests" | ||
run: | | ||
php vendor/bin/phpunit --colors=always --testsuite integration-tests | ||
- name: "integration tests succeeded" | ||
if: ${{ success() }} | ||
run: | | ||
echo '✅ integration tests pass, congratulations!' | ||
- name: "integration tests failed" | ||
if: ${{ failure() }} | ||
run: | | ||
echo '::error:: ❗integration tests failed (╯°益°)╯彡┻━┻ ' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
version: '3' | ||
|
||
services: | ||
php-cli: | ||
build: | ||
context: ./docker/php-cli | ||
volumes: | ||
- .:/var/www/html | ||
working_dir: /var/www/html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
FROM php:7.4-cli-alpine | ||
|
||
RUN apk add unzip libpq-dev git icu-dev \ | ||
&& docker-php-ext-install bcmath intl \ | ||
&& docker-php-ext-enable bcmath intl | ||
|
||
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/bin --filename=composer --quiet | ||
|
||
ENV COMPOSER_ALLOW_SUPERUSER 1 | ||
WORKDIR /var/www/html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
use Rector\Config\RectorConfig; | ||
use Rector\Set\ValueObject\DowngradeLevelSetList; | ||
use Rector\TypeDeclaration\Rector\ClassMethod\AddVoidReturnTypeWhereNoReturnRector; | ||
|
||
return RectorConfig::configure() | ||
->withPaths([ | ||
__DIR__ . '/src', | ||
__DIR__ . '/tests', | ||
]) | ||
->withSets( | ||
[DowngradeLevelSetList::DOWN_TO_PHP_74] | ||
) | ||
->withPhpSets( | ||
false, // 8.3 | ||
false, // 8.2 | ||
false, // 8.1 | ||
false, // 8.0 | ||
true // 7.4 | ||
) | ||
->withRules([ | ||
AddVoidReturnTypeWhereNoReturnRector::class, | ||
]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.