Skip to content

Commit 58b5cc8

Browse files
committed
Test disable redis ext
1 parent f142989 commit 58b5cc8

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

.github/workflows/php.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,16 @@ jobs:
171171
# Should be the highest supported version, so we can use the newest tools
172172
php-version: '8.5'
173173
tools: composer, composer-require-checker, composer-unused, phpcs
174-
extensions: ctype, date, dom, filter, hash, mbstring, openssl, pcre, soap, spl, xml, :redis
174+
extensions: ctype, date, dom, filter, hash, mbstring, openssl, pcre, soap, spl, xml
175175
coverage: none
176176

177+
- name: Disable Redis PHP extension
178+
run: |
179+
if php -m | grep -q redis; then
180+
phpdismod redis || echo "phpdismod not available"
181+
echo "extension=redis.so" > redis.ini && sudo mv redis.ini /etc/php/$(php -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')/cli/conf.d/20-redis.ini && sudo rm /etc/php/$(php -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')/cli/conf.d/20-redis.ini
182+
fi
183+
177184
- name: Setup problem matchers for PHP
178185
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"
179186

0 commit comments

Comments
 (0)