vendidero / woocommerce-germanized

Adapt WooCommerce to the German Market with Germanized for WooCommerce
https://vendidero.de/woocommerce-germanized
Other
51 stars 41 forks source link

Install PHPUnit-compat the Composer way #175

Closed szepeviktor closed 2 years ago

szepeviktor commented 2 years ago

Let's give it a try! 🚀

dennisnissle commented 2 years ago

Hi there,

what is the advantage of changing code that is currently working perfectly? Please elaborate.

Best, Dennis

szepeviktor commented 2 years ago

No, there is no advantage. It is just smaller and makes Composer work.

szepeviktor commented 2 years ago

Actually there is: I'm learning GHA and Composer internals.

I'm a research-type guy, not a businessman/pioneer.

szepeviktor commented 2 years ago

@dennisnissle If you are interested here is how use Composer only for PHPUnit-compat.

      - name: Composer install
        run: |
          composer config github-oauth.github.com ${{ secrets.GITHUB_TOKEN }}
          composer install

      - name: Install compatibility-with-php8-to-phpunit-7
        if: ${{ matrix.php == '8.0' }}
        run: |
          composer config --unset platform
          composer config repositories.0 '{"type":"vcs","url":"https://github.com/woocommerce/phpunit.git"}'
          composer require --dev --update-with-all-dependencies --ignore-platform-req=php 'phpunit/phpunit:dev-add-compatibility-with-php8-to-phpunit-7 as 7.5'

https://github.com/szepeviktor/woocommerce-germanized/blob/a31949e3bc5a36dc216558b7c8f22d51a2e7582b/.github/workflows/test.yml#L36-L46