From 5020a46388f9cdaff95d56b405b2223cb775cf72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Szo=C5=82tysek?= Date: Fri, 10 May 2024 15:52:11 +0200 Subject: [PATCH] ErrorHandler --- bin/ci/test.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/bin/ci/test.sh b/bin/ci/test.sh index c15971e..2d3479c 100755 --- a/bin/ci/test.sh +++ b/bin/ci/test.sh @@ -64,7 +64,7 @@ docker run -i --rm ibexa_php:latest-node bash -c "php -v; php -m" printf "\nVersion and module information about php build with enabled xdebug\n" docker run -i --rm -e ENABLE_XDEBUG="1" ibexa_php:latest-node bash -c "php -v; php -m" -printf "\Integration: Behat testing on ibexa_php:latest and ibexa_php:latest-node with eZ Platform\n" +printf "\nIntegration: Behat testing on ibexa_php:latest and ibexa_php:latest-node with eZ Platform\n" cd volumes/ezplatform export COMPOSE_FILE="doc/docker/base-dev.yml:doc/docker/redis.yml:doc/docker/selenium.yml" @@ -72,6 +72,13 @@ export APP_ENV="behat" APP_DEBUG="1" export PHP_IMAGE="ibexa_php:latest-node" PHP_IMAGE_DEV="ibexa_php:latest-node" docker-compose --env-file .env up -d --build --force-recreate + +if php -v | grep -q '8.3'; then + echo '> Set PHP 8.2+ Ibexa error handler to avoid deprecations' + docker-compose --env-file=.env exec -T --user www-data app sh -c "composer config extra.runtime.error_handler \"\\Ibexa\\Contracts\\Core\\MVC\\Symfony\\ErrorHandler\\Php82HideDeprecationsErrorHandler\"" + docker-compose --env-file=.env exec -T --user www-data app sh -c "composer dump-autoload" +fi + echo '> Workaround for test issues: Change ownership of files inside docker container' docker-compose --env-file=.env exec -T app sh -c 'chown -R www-data:www-data /var/www' # Rebuild Symfony container