shivammathur / setup-php

GitHub action to set up PHP with extensions, php.ini configuration, coverage drivers, and various tools.
https://setup-php.com
MIT License
2.85k stars 334 forks source link

Ioncube doesn't install on php 7.2 #856

Closed jocel1 closed 2 weeks ago

jocel1 commented 3 weeks ago

Describe the bug Since the latest bumpup of the v2 tag, ioncube doesn't install anymore on v2 When using 2.29.0 release everything works properly Version

Runners

Operating systems ubuntu-latest

PHP versions 7.2

To Reproduce

Expected behavior Properly install ioncube

Screenshots/Logs

image

2.29.0:

image
shivammathur commented 3 weeks ago

@jocel1 Please try running the workflow again, I'm unable to reproduce the issue Test workflow: https://github.com/shivammathur/test-setup-php/actions/runs/9759633744/job/26936713788#step:2:19

jocel1 commented 3 weeks ago

Same issue after several retry. I'm also using cache-extensions module, I'll try without it:

  code-quality:
    timeout-minutes: 20
    runs-on: ubuntu-latest
    strategy:
      matrix:
        php-versions: ['7.2']
    env:
      extensions: intl, mbstring, gd, apcu, memcached, ioncube
      key: cache-v1
    name: Code Quality on PHP ${{ matrix.php-versions }}
    permissions:
      contents: 'read'
      id-token: 'write'

      - name: Setup cache environment
        id: extcache
        uses: shivammathur/cache-extensions@v1
        with:
          php-version: ${{ matrix.php-versions }}
          extensions: ${{ env.extensions }}
          key: ${{ env.key }}

      - name: Cache extensions
        uses: actions/cache@v4
        with:
          path: ${{ steps.extcache.outputs.dir }}
          key: ${{ steps.extcache.outputs.key }}
          restore-keys: ${{ steps.extcache.outputs.key }}

      - name: Setup PHP with PECL extension
        uses: shivammathur/setup-php@v2
        with:
          php-version: ${{ matrix.php-versions }}
          extensions: ${{ env.extensions }}
          coverage: xdebug
jocel1 commented 3 weeks ago

I confirm the issue comes from the caching. When the cache doesn't exist, ioncube installation works properly. However once the cache exists, it fails (I've just tried bumping the cache id the cache-v2 to force a cache reset, same issue)

jocel1 commented 3 weeks ago

Note caching and 2.29.0 works properly. It seems to start failing on 2.30.5, I suspect https://github.com/shivammathur/setup-php/issues/840 to be involved in this issue :)

jocel1 commented 3 weeks ago

2.30.4:

image

2.30.5 without caching:

image

2.30.5 with caching:

image
shivammathur commented 3 weeks ago

Ah!, Fixed in https://github.com/shivammathur/setup-php/commit/afff805ea318c148735d2a1e88142d355311db2f. It will be in the next release.

shivammathur commented 2 weeks ago

Released 2.31.1 with the fix.