Skip to content

Commit

Permalink
PHP 8.2: Add custom error handler if needed (#80)
Browse files Browse the repository at this point in the history
* PHP 8.2: Add custom error handler if needed

* Added dump-autoload
  • Loading branch information
mnocon authored Dec 11, 2023
1 parent 904ab3d commit ca15648
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 0 deletions.
6 changes: 6 additions & 0 deletions bin/4.5.x-dev/prepare_project_edition.sh
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,12 @@ docker exec install_dependencies composer recipes:install ${DEPENDENCY_PACKAGE_N
# Enable FriendsOfBehat SymfonyExtension in the Behat env
sudo sed -i "s/\['test' => true\]/\['test' => true, 'behat' => true\]/g" config/bundles.php

if [[ $PHP_IMAGE == *"8.2"* ]]; then
echo "> Set PHP 8.2 Ibexa error handler to avoid deprecations"
docker exec install_dependencies composer config extra.runtime.error_handler "\\Ibexa\\Contracts\\Core\\MVC\\Symfony\\ErrorHandler\\Php82HideDeprecationsErrorHandler"
docker exec install_dependencies composer dump-autoload
fi

echo "> Display composer.json for debugging"
cat composer.json

Expand Down
6 changes: 6 additions & 0 deletions bin/4.6.x-dev/prepare_project_edition.sh
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,12 @@ docker exec install_dependencies composer update --no-scripts
# Enable FriendsOfBehat SymfonyExtension in the Behat env
sudo sed -i "s/\['test' => true\]/\['test' => true, 'behat' => true\]/g" config/bundles.php

if [[ $PHP_IMAGE == *"8.2"* ]]; then
echo "> Set PHP 8.2 Ibexa error handler to avoid deprecations"
docker exec install_dependencies composer config extra.runtime.error_handler "\\Ibexa\\Contracts\\Core\\MVC\\Symfony\\ErrorHandler\\Php82HideDeprecationsErrorHandler"
docker exec install_dependencies composer dump-autoload
fi

echo "> Display composer.json for debugging"
cat composer.json

Expand Down
6 changes: 6 additions & 0 deletions bin/^3.3.x-dev/prepare_project_edition.sh
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,12 @@ sudo sed -i "s/\['test' => true\]/\['test' => true, 'behat' => true\]/g" config/
# Create a default Behat configuration file
cp "behat_ibexa_${PROJECT_EDITION}.yaml" behat.yaml

if [[ $PHP_IMAGE == *"8.2"* ]]; then
echo "> Set PHP 8.2 Ibexa error handler to avoid deprecations"
docker exec install_dependencies composer config extra.runtime.error_handler "\\Ibexa\\Contracts\\Core\\MVC\\Symfony\\ErrorHandler\\Php82HideDeprecationsErrorHandler"
docker exec install_dependencies composer dump-autoload
fi

echo "> Display composer.json for debugging"
cat composer.json

Expand Down
6 changes: 6 additions & 0 deletions bin/stable/prepare_project_edition.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ sudo sed -i "s/\['test' => true\]/\['test' => true, 'behat' => true\]/g" config/
# Create a default Behat configuration file
cp "behat_ibexa_${PROJECT_EDITION}.yaml" behat.yaml

if [[ $PHP_IMAGE == *"8.2"* ]]; then
echo "> Set PHP 8.2 Ibexa error handler to avoid deprecations"
docker exec install_dependencies composer config extra.runtime.error_handler "\\Ibexa\\Contracts\\Core\\MVC\\Symfony\\ErrorHandler\\Php82HideDeprecationsErrorHandler"
docker exec install_dependencies composer dump-autoload
fi

# Depenencies are installed and container can be removed
docker container stop install_dependencies
docker container rm install_dependencies
Expand Down

0 comments on commit ca15648

Please sign in to comment.