Check for PHP startup warnings

pull/10596/head
Michele Locati 3 years ago
parent 93648376f0
commit 6383242b14
No known key found for this signature in database
GPG Key ID: 98B7CE2E7234E28B
  1. 9
      .github/workflows/test_php_ext.yml

@ -60,5 +60,14 @@ jobs:
MAKE="make -j$(nproc)" pecl install $GITHUB_WORKSPACE/protobuf-*.tgz
- name: Enable extension
run: docker-php-ext-enable protobuf
- name: Check for PHP startup warnings
run: |
php -d display_errors=stderr -d display_startup_errors=1 -d error_reporting=-1 -r ';' 2>/tmp/protobuf-warnings
if [ -s /tmp/protobuf-warnings ]; then
echo 'The PHP extension was successfully installed, but PHP raised these warnings:' >&2
cat /tmp/protobuf-warnings >&2
exit 1
fi
echo "PHP didn't raise any warnings at startup."
- name: Inspect extension
run: php --ri protobuf

Loading…
Cancel
Save