From 8c5ae4c95703346103d32a376738bb7127e0b976 Mon Sep 17 00:00:00 2001 From: Siddharth Thevaril Date: Tue, 27 Sep 2022 12:21:13 +0530 Subject: [PATCH 1/2] PHP compat dev for 8.0 --- .github/workflows/php-compatibility-dev.yml | 37 +++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/php-compatibility-dev.yml diff --git a/.github/workflows/php-compatibility-dev.yml b/.github/workflows/php-compatibility-dev.yml new file mode 100644 index 00000000..fa102bf2 --- /dev/null +++ b/.github/workflows/php-compatibility-dev.yml @@ -0,0 +1,37 @@ +name: PHP Compatibility + +on: + push: + branches: + - develop + - trunk + pull_request: + branches: + - develop + +jobs: + php-compatibility: + name: PHP minimum 8.0 + + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Set PHP version + uses: shivammathur/setup-php@v2 + with: + php-version: '7.4' + tools: composer:v2 + coverage: none + + - name: Install dependencies + run: | + composer g require --dev phpcompatibility/phpcompatibility-wp:"*" + composer g config minimum-stability dev + composer g require --dev phpcompatibility/phpcompatibility-wp + composer g require --dev phpcompatibility/php-compatibility:"dev-develop as 9.99.99" + + - name: Run PHP Compatibility + run: vendor/bin/phpcs sophi.php includes/ --standard=PHPCompatibilityWP --severity=1 --runtime-set testVersion 8.0- --extensions=php From 6b76ced7f529b24f5dbb2f8beaf19f0316b5036b Mon Sep 17 00:00:00 2001 From: Siddharth Thevaril Date: Tue, 27 Sep 2022 12:32:22 +0530 Subject: [PATCH 2/2] mod allow-plugins --- .github/workflows/php-compatibility-dev.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/php-compatibility-dev.yml b/.github/workflows/php-compatibility-dev.yml index fa102bf2..46bad96e 100644 --- a/.github/workflows/php-compatibility-dev.yml +++ b/.github/workflows/php-compatibility-dev.yml @@ -1,4 +1,4 @@ -name: PHP Compatibility +name: PHP Compatibility-dev for 8.0 on: push: @@ -28,10 +28,11 @@ jobs: - name: Install dependencies run: | + composer global config --no-plugins allow-plugins.dealerdirect/phpcodesniffer-composer-installer true composer g require --dev phpcompatibility/phpcompatibility-wp:"*" composer g config minimum-stability dev composer g require --dev phpcompatibility/phpcompatibility-wp composer g require --dev phpcompatibility/php-compatibility:"dev-develop as 9.99.99" - name: Run PHP Compatibility - run: vendor/bin/phpcs sophi.php includes/ --standard=PHPCompatibilityWP --severity=1 --runtime-set testVersion 8.0- --extensions=php + run: ~/.composer/vendor/bin/phpcs sophi.php includes/ --standard=PHPCompatibilityWP --severity=1 --runtime-set testVersion 8.0- --extensions=php