Skip to content

Commit

Permalink
Fix PHP 8.0 tests
Browse files Browse the repository at this point in the history
  • Loading branch information
julienfalque committed Nov 29, 2020
1 parent 9ce7cf8 commit a41ece6
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,24 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: xdebug

- name: Disable Xdebug
- name: Disable Xdebug (PHP <8.0)
if: matrix.php-version != '8.0'
run: sudo phpdismod -v ${{ matrix.php-version }} xdebug

- name: Disable Xdebug (PHP 8.0)
if: matrix.php-version == '8.0'
run: |
php -m
scan_dir=$(php --ini | grep additional | sed -e "s|.*: s*||")
ini_file=$(php --ini | grep "Loaded Configuration" | sed -e "s|.*:s*||" | sed "s/ //g")
pecl_file="$scan_dir"/99-pecl.ini
sudo sed -Ei "/xdebug/d" "${ini_file:?}"
sudo sed -Ei "/xdebug/d" "${pecl_file:?}"
sudo rm -rf "$scan_dir"/xdebug*
php -m
- name: Checkout code
uses: actions/checkout@v2

Expand Down

0 comments on commit a41ece6

Please sign in to comment.