From eae9ceed277e0aa98b58de6331ccf65663e1c90d Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Fri, 21 Mar 2025 10:18:17 +0100 Subject: [PATCH 1/2] edition-tag.html.twig: New line before package In the tooltip, the new line was often after the slash (between vendor and package). Now, it's just before the package ref, before the vendor. https://www.w3.org/TR/2011/WD-html5-20110525/elements.html#the-title-attribute https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/title#multiline_titles --- .../.phpdoc/template/components/edition-tag.html.twig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/php_api_ref/.phpdoc/template/components/edition-tag.html.twig b/tools/php_api_ref/.phpdoc/template/components/edition-tag.html.twig index 6a4207cb7f..03f80e991d 100644 --- a/tools/php_api_ref/.phpdoc/template/components/edition-tag.html.twig +++ b/tools/php_api_ref/.phpdoc/template/components/edition-tag.html.twig @@ -32,6 +32,6 @@ {% endfor %} {% endif %} {% elseif package_edition_map[package] == 'optional' %} -
+
{% endif %} {% endblock %} From b264fbbee6463746dfdc537cbaac2edbd6f6391c Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Fri, 21 Mar 2025 11:14:22 +0100 Subject: [PATCH 2/2] phpdoc.sh: Ease the targeting of a dev branch --- tools/php_api_ref/phpdoc.sh | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/tools/php_api_ref/phpdoc.sh b/tools/php_api_ref/phpdoc.sh index 5ca49a3727..6e67e798ea 100755 --- a/tools/php_api_ref/phpdoc.sh +++ b/tools/php_api_ref/phpdoc.sh @@ -18,6 +18,8 @@ PHPDOC_DIR="$(pwd)/tools/php_api_ref/.phpdoc"; # Absolute path to phpDocumentor 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 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=''; # Branch from and for which the Reference is built when using a dev branch as version +VIRTUAL_DXP_VERSION=''; # Version for which the reference is supposedly built when using dev branch as version if [ ! -d $OUTPUT_DIR ]; then echo -n "Creating ${OUTPUT_DIR}… "; @@ -49,9 +51,18 @@ 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}…"; - composer 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 ./; + if [[ "$DXP_VERSION" == *".x-dev" ]]; then + composer create-project ibexa/website-skeleton:$DXP_VERSION . --no-interaction --no-install --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 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; + if [ -n "$AUTH_JSON" ]; then + cp $AUTH_JSON ./; + fi; fi; composer install --no-interaction --ignore-platform-reqs --no-scripts; fi; @@ -70,11 +81,11 @@ if [ 0 -eq $DXP_ALREADY_EXISTS ]; then done; fi; -#if [ 0 -eq $DXP_ALREADY_EXISTS ]; then -# MY_PACKAGE=''; -# MY_BRANCH=''; -# composer require --no-interaction --ignore-platform-reqs --no-scripts ibexa/$MY_PACKAGE "$MY_BRANCH as $DXP_VERSION"; -#fi; +if [[ "$DXP_VERSION" == *".x-dev" ]]; then + GIT_REF=$BASE_DXP_BRANCH; +else + GIT_REF="v$DXP_VERSION"; +fi if [ 0 -eq $DXP_ALREADY_EXISTS ]; then echo -n 'Building package→edition map… '; @@ -117,6 +128,10 @@ if [ 0 -eq $DXP_ALREADY_EXISTS ]; then echo 'OK'; fi; +if [[ "$DXP_VERSION" == *".x-dev" ]]; then + DXP_VERSION=$VIRTUAL_DXP_VERSION; +fi; + echo 'Set up phpDocumentor…'; sed "s/version number=\".*\"/version number=\"$DXP_VERSION\"/" $PHPDOC_CONF > ./phpdoc.dist.xml; mkdir .phpdoc;