Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IBX-8422: Update scripts for PHP 8.3 as default when releasing tags #91

Merged
merged 6 commits into from
Jul 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions bin/4.6.x-dev/prepare_project_edition.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ PROJECT_EDITION=$1
PROJECT_VERSION=$2
PROJECT_BUILD_DIR=${HOME}/build/project
export COMPOSE_FILE=$3
export PHP_IMAGE=${4-ghcr.io/ibexa/docker/php:8.1-node18}
export PHP_IMAGE=${4-ghcr.io/ibexa/docker/php:8.3-node18}
export COMPOSER_MAX_PARALLEL_HTTP=6 # Reduce Composer parallelism to work around Github Actions network errors

if [[ -n "${DOCKER_PASSWORD}" ]]; then
Expand Down Expand Up @@ -137,7 +137,7 @@ docker exec install_dependencies composer update --no-scripts
sudo sed -i "s/\['test' => true\]/\['test' => true, 'behat' => true\]/g" config/bundles.php

if [[ $PHP_IMAGE == *"8.2"* ]] || [[ $PHP_IMAGE == *"8.3"* ]]; then
echo "> Set PHP 8.2 Ibexa error handler to avoid deprecations"
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
Expand Down
2 changes: 1 addition & 1 deletion bin/5.0.x-dev/prepare_project_edition.sh
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ docker exec install_dependencies composer update --no-scripts
sudo sed -i "s/\['test' => true\]/\['test' => true, 'behat' => true\]/g" config/bundles.php

if [[ $PHP_IMAGE == *"8.2"* ]] || [[ $PHP_IMAGE == *"8.3"* ]]; then
echo "> Set PHP 8.2 Ibexa error handler to avoid deprecations"
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
Expand Down
2 changes: 1 addition & 1 deletion bin/^3.3.x-dev/prepare_project_edition.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ PROJECT_EDITION=$1
PROJECT_VERSION=$2
PROJECT_BUILD_DIR=${HOME}/build/project
export COMPOSE_FILE=$3
export PHP_IMAGE=${4-ghcr.io/ibexa/docker/php:8.1-node18}
export PHP_IMAGE=${4-ghcr.io/ibexa/docker/php:8.3-node18}
export COMPOSER_MAX_PARALLEL_HTTP=6 # Reduce Composer parallelism to work around Github Actions network errors

if [[ -n "${DOCKER_PASSWORD}" ]]; then
Expand Down
16 changes: 5 additions & 11 deletions bin/stable/prepare_project_edition.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ PROJECT_EDITION=$1
PROJECT_VERSION=$2
PROJECT_BUILD_DIR=${HOME}/build/project
export COMPOSE_FILE=$3
export PHP_IMAGE=${4-ezsystems/php:7.4-v2-node16}
export PHP_IMAGE=${4-ghcr.io/ibexa/docker/php:8.3-node18}
export COMPOSER_MAX_PARALLEL_HTTP=6 # Reduce Composer parallelism to work around Github Actions network errors

DEPENDENCY_PACKAGE_DIR=$(pwd)
Expand Down Expand Up @@ -34,12 +34,12 @@ if [ -f ${DEPENDENCY_PACKAGE_DIR}/auth.json ]; then
cp ${DEPENDENCY_PACKAGE_DIR}/auth.json .
fi

if [[ $PHP_IMAGE == *"7."* ]] || [[ $PHP_IMAGE == *"8.0"* ]] || [[ $PHP_IMAGE == *"8.3"* ]]; then
echo "> Running composer update"
docker exec install_dependencies composer update --no-scripts --ansi
else
if [[ $PHP_IMAGE == *"8.3"* ]]; then
echo "> Running composer install"
docker exec install_dependencies composer install --no-scripts --ansi
micszo marked this conversation as resolved.
Show resolved Hide resolved
else
echo "> Running composer update"
docker exec install_dependencies composer update --no-scripts --ansi
fi

if [[ $PROJECT_VERSION == *"v3.3"* ]]; then
Expand All @@ -56,12 +56,6 @@ 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"* ]] || [[ $PHP_IMAGE == *"8.3"* ]]; 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
Loading