Skip to content

Commit 27c43ab

Browse files
committed
Fix php 7.3 build
1 parent bfa586e commit 27c43ab

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

tests/setup.sh

+5-3
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ if [[ ! -e "$EXPECTED_AST_FILE" ]]; then
2525

2626
git clone --depth 1 https://github.com/nikic/php-ast.git php-ast
2727

28+
export CFLAGS="-O3"
2829
pushd php-ast
2930
# Install the ast extension
3031
phpize
@@ -37,10 +38,11 @@ else
3738
echo "Using cached extension."
3839
fi
3940

40-
php -r 'function_exists("ast\parse_code") || exit("Failed to enable php-ast");'
41-
4241
echo "extension=$EXPECTED_AST_FILE" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
4342

43+
php -r 'function_exists("ast\parse_code") || (print("Failed to enable php-ast\n") && exit(1));'
44+
4445
# Disable xdebug, since we aren't currently gathering code coverage data and
4546
# having xdebug slows down Composer a bit.
46-
phpenv config-rm xdebug.ini
47+
# TODO(optional): Once xdebug is enabled for PHP 7.3 on Travis, get rid of the '|| true'
48+
phpenv config-rm xdebug.ini || true

0 commit comments

Comments
 (0)