From db59fa1d1f2612621a107934280b01581d33e2a0 Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Fri, 22 May 2026 07:57:12 +0200 Subject: [PATCH 1/2] api_refs.sh: Avoid hint about master VS main ``` + git init hint: Using 'master' as the name for the initial branch. This default branch name hint: will change to "main" in Git 3.0. To configure the initial branch name ``` --- tools/api_refs/api_refs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/api_refs/api_refs.sh b/tools/api_refs/api_refs.sh index 5f9f31167b..1e3c265727 100755 --- a/tools/api_refs/api_refs.sh +++ b/tools/api_refs/api_refs.sh @@ -216,7 +216,7 @@ fi; if [ 0 -eq $DXP_ALREADY_EXISTS ]; then echo 'Set up DXP recipes…'; - git init && git add . && git commit -m "Installed Ibexa Commerce" > /dev/null; + git init -b main && git add . && git commit -m "Installed Ibexa Commerce" > /dev/null; composer recipes:install ibexa/$DXP_EDITION --force --reset --no-interaction; fi; From ef1d3d85c0332e5283acc64f9a36a393ffa3796c Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Fri, 22 May 2026 08:10:09 +0200 Subject: [PATCH 2/2] api_refs.sh: COMPOSER_BINARY var --- tools/api_refs/api_refs.sh | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/tools/api_refs/api_refs.sh b/tools/api_refs/api_refs.sh index 1e3c265727..6701c466f0 100755 --- a/tools/api_refs/api_refs.sh +++ b/tools/api_refs/api_refs.sh @@ -24,6 +24,7 @@ REDOCLY_TEMPLATE="$(pwd)/tools/api_refs/redocly.hbs"; # Absolute path to Redocly OPENAPI_FIX="$(pwd)/tools/api_refs/openapi.php"; # A script editing and fixing few things on the dumped schema (should be temporary and fixes reported to source) PHP_BINARY="php -d error_reporting=`php -r 'echo E_ALL & ~E_DEPRECATED;'`"; # Avoid depreciation messages from phpDocumentor/Reflection/issues/529 when using PHP 8.2 or higher +COMPOSER_BINARY='composer'; TMP_DXP_DIR=/tmp/ibexa-dxp-phpdoc; # Absolute path of the temporary directory in which Ibexa DXP will be installed and the PHP API Reference built FORCE_DXP_INSTALL=1; # If 1, empty the temporary directory, install DXP from scratch, build, remove temporary directory; if 0, potentially reuse the DXP already installed in temporary directory, keep temporary directory for future uses. BASE_DXP_BRANCH="${BASE_DXP_BRANCH:-}"; # Branch from and for which the Reference is built when using a dev branch as version; can be overridden by the BASE_DXP_BRANCH env var @@ -63,32 +64,32 @@ cd $TMP_DXP_DIR; # /!\ Change working directory (reason why all paths must be ab if [ 0 -eq $DXP_ALREADY_EXISTS ]; then echo "Creating ibexa/$DXP_EDITION-skeleton:$DXP_VERSION project in ${TMP_DXP_DIR}…"; if [[ "$DXP_VERSION" == *".x-dev" ]]; then - composer create-project ibexa/website-skeleton:$DXP_VERSION . --no-interaction --ignore-platform-reqs --no-scripts --stability=dev; + $COMPOSER_BINARY create-project ibexa/website-skeleton:$DXP_VERSION . --no-interaction --ignore-platform-reqs --no-scripts --stability=dev; if [ -n "$AUTH_JSON" ]; then cp $AUTH_JSON ./; fi; - composer config repositories.ibexa composer https://updates.ibexa.co; - composer config extra.symfony.endpoint "https://api.github.com/repos/ibexa/recipes-dev/contents/index.json?ref=flex/main"; - composer require ibexa/$DXP_EDITION:$DXP_VERSION --no-interaction --update-with-all-dependencies --no-install --ignore-platform-reqs --no-scripts; + $COMPOSER_BINARY config repositories.ibexa composer https://updates.ibexa.co; + $COMPOSER_BINARY config extra.symfony.endpoint "https://api.github.com/repos/ibexa/recipes-dev/contents/index.json?ref=flex/main"; + $COMPOSER_BINARY require ibexa/$DXP_EDITION:$DXP_VERSION --no-interaction --update-with-all-dependencies --no-install --ignore-platform-reqs --no-scripts; elif [[ "$DXP_VERSION" == *"-rc"* ]]; then - composer create-project ibexa/website-skeleton:$DXP_VERSION . --no-interaction --ignore-platform-reqs --no-scripts --stability=rc; + $COMPOSER_BINARY create-project ibexa/website-skeleton:$DXP_VERSION . --no-interaction --ignore-platform-reqs --no-scripts --stability=rc; if [ -n "$AUTH_JSON" ]; then cp $AUTH_JSON ./; fi; - composer config repositories.ibexa composer https://updates.ibexa.co; - composer require ibexa/$DXP_EDITION:$DXP_VERSION --no-interaction --update-with-all-dependencies --no-install --ignore-platform-reqs --no-scripts; + $COMPOSER_BINARY config repositories.ibexa composer https://updates.ibexa.co; + $COMPOSER_BINARY require ibexa/$DXP_EDITION:$DXP_VERSION --no-interaction --update-with-all-dependencies --no-install --ignore-platform-reqs --no-scripts; else - composer create-project ibexa/$DXP_EDITION-skeleton:$DXP_VERSION . --no-interaction --no-install --ignore-platform-reqs --no-scripts; + $COMPOSER_BINARY create-project ibexa/$DXP_EDITION-skeleton:$DXP_VERSION . --no-interaction --no-install --ignore-platform-reqs --no-scripts; if [ -n "$AUTH_JSON" ]; then cp $AUTH_JSON ./; fi; fi; - composer install --no-interaction --ignore-platform-reqs --no-scripts; + $COMPOSER_BINARY install --no-interaction --ignore-platform-reqs --no-scripts; fi; if [[ "$DXP_VERSION" == *".*"* ]]; then export COMPOSER_ROOT_VERSION=0.0.0; - DXP_VERSION=$(composer -n show ibexa/$DXP_EDITION | grep -E "^version" | cut -d 'v' -f 3); + DXP_VERSION=$($COMPOSER_BINARY -n show ibexa/$DXP_EDITION | grep -E "^version" | cut -d 'v' -f 3); echo "Obtained version: $DXP_VERSION"; fi; @@ -96,7 +97,7 @@ export COMPOSER_ROOT_VERSION=$DXP_VERSION; if [ 0 -eq $DXP_ALREADY_EXISTS ]; then for additional_package in "${DXP_ADD_ONS[@]}"; do - composer require --no-interaction --ignore-platform-reqs --no-scripts --with-all-dependencies ibexa/$additional_package:$DXP_VERSION; + $COMPOSER_BINARY require --no-interaction --ignore-platform-reqs --no-scripts --with-all-dependencies ibexa/$additional_package:$DXP_VERSION; done; fi; @@ -118,7 +119,7 @@ if [ 0 -eq $DXP_ALREADY_EXISTS ]; then package=$(echo $line | cut -d '"' -f 2); if [[ ! "${DXP_EDITIONS[*]}" =~ "${package/ibexa\//}" ]]; then PACKAGE_MAP="$PACKAGE_MAP\n'$package': '$edition'," - NAMESPACES=$(composer show "$package" --available --format=json | \ + NAMESPACES=$($COMPOSER_BINARY show "$package" --available --format=json | \ jq -r --arg PACKAGE "$package" '"'\''\(.autoload | ."psr-4" | try to_entries[] catch empty | .key[:-1] | sub("\\\\";"\\\\\\";"g"))'\'': '\''\($PACKAGE)'\'',"') NAMESPACE_MAP="$NAMESPACE_MAP\n$NAMESPACES" fi; @@ -131,7 +132,7 @@ if [ 0 -eq $DXP_ALREADY_EXISTS ]; then echo -n 'Building namespace→edition map… '; for package in "${DXP_ADD_ONS[@]}"; do - NAMESPACES=$(composer show "ibexa/$package" --available --format=json | \ + NAMESPACES=$($COMPOSER_BINARY show "ibexa/$package" --available --format=json | \ jq -r --arg PACKAGE "ibexa/$package" '"'\''\(.autoload | ."psr-4" | try to_entries[] catch empty | .key[:-1] | sub("\\\\";"\\\\\\";"g"))'\'': '\''\($PACKAGE)'\'',"') NAMESPACE_MAP="$NAMESPACE_MAP\n$NAMESPACES" PACKAGE_MAP="$PACKAGE_MAP\n'ibexa/$package': 'optional'," @@ -217,7 +218,7 @@ fi; if [ 0 -eq $DXP_ALREADY_EXISTS ]; then echo 'Set up DXP recipes…'; git init -b main && git add . && git commit -m "Installed Ibexa Commerce" > /dev/null; - composer recipes:install ibexa/$DXP_EDITION --force --reset --no-interaction; + $COMPOSER_BINARY recipes:install ibexa/$DXP_EDITION --force --reset --no-interaction; fi; echo 'Dump REST OpenAPI schema… ';