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

[TASK] Prepare release-11.6.x for TYPO3 11.5 LTS #3783

Merged
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
8 changes: 4 additions & 4 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ A clear and concise description of what you expected to happen.
If applicable, add screenshots to help explain your problem.

**Used versions (please complete the following information):**
- TYPO3 Version: [e.g. 11.5.26]
- TYPO3 Version: [e.g. 12.4.0]
- Browser: [e.g. chrome, safari]
- EXT:solr Version: [e.g. 11.5.3]
- Used Apache Solr Version: [e.g. 8.11.1]
- PHP Version: [e.g. 8.1.0]
- EXT:solr Version: [e.g. 12.0.0]
- Used Apache Solr Version: [e.g. 9.3.0]
- PHP Version: [e.g. 8.2.0]
- MySQL Version: [e.g. 8.0.0]

**Additional context**
Expand Down
17 changes: 1 addition & 16 deletions .github/workflows/ci-matrix.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,6 @@
{
"main": {
"release-11.6.x": {
"PHP": [ "7.4", "8.0", "8.1" ],
"TYPO3": [ "11", "11.5.x-dev" ]
},

"release-11.5.x": {
"PHP": [ "7.4", "8.0", "8.1" ],
"TYPO3": [ "11", "11.5.x-dev" ]
},

"release-11.1.x": {
"PHP": [ "7.2", "7.3", "7.4" ],
"TYPO3": [ "10", "10.4.x-dev" ]
},

"release-11.0.x": {
"PHP": [ "7.2", "7.3", "7.4" ],
"TYPO3": [ "9", "10", "9.5.x-dev", "10.4.x-dev" ]
}
}
77 changes: 26 additions & 51 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ name: build

on:
push:
branches: [ main, release-11.5.x, release-11.1.x, release-11.0.x ]
branches: [ main, release-11.6.x ]
tags:
- "**"
pull_request:
branches: [ main, release-11.5.x, release-11.1.x, release-11.0.x ]
branches: [ main, release-11.6.x ]

env:
CI_BUILD_DIRECTORY: '/home/runner/work/ext-solr/ext-solr/.Build'
Expand All @@ -23,18 +23,21 @@ jobs:
outputs:
matrix: ${{ steps.collect_build_matrix.outputs.matrix }}
steps:
# Workaround for issue with actions/checkout@v2 wrong PR commit checkout: See https://github.com/actions/checkout/issues/299#issuecomment-677674415
# Workaround for issue with actions/checkout "wrong PR commit checkout":
# See:
# ** https://github.com/actions/checkout/issues/299#issuecomment-677674415
# ** https://github.com/actions/checkout/issues/1359#issuecomment-1631503791
-
name: Checkout current state of Pull Request
if: github.event_name == 'pull_request'
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
-
name: Checkout current state of Branch
if: github.event_name == 'push'
uses: actions/checkout@v2
# End: Workaround for issue with actions/checkout@v2 wrong PR commit checkout
uses: actions/checkout@v3
# End: Workaround for issue with actions/checkout...
-
name: "Resolve target branch of pull request."
if: github.event_name == 'pull_request'
Expand Down Expand Up @@ -66,15 +69,15 @@ jobs:
echo "BRANCH_NAME="$BRANCH_NAME
echo -e "matrix : "
echo $matrix
echo ::set-output name=matrix::$(echo $matrix)
>&2 echo -e "Example Annotation on error. Is visible in Actions wokflow view."
>&2 echo -e "Non-stable releases can not be published to TER. The tag 11.5.0-beta-1 is invalid for TER."
echo "matrix=$(echo $matrix)" >> $GITHUB_OUTPUT
>&2 echo -e "Example Annotation on error. Is visible in Actions workflow view."
>&2 echo -e "Non-stable releases can not be published to TER. The tags containing beta-1 is invalid for TER."
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v2
-
name: Build Docker image
uses: docker/build-push-action@v2
uses: docker/build-push-action@v4
with:
context: .
file: ./Docker/SolrServer/Dockerfile
Expand All @@ -90,7 +93,7 @@ jobs:
./Build/Test/cibuild_docker.sh
-
name: Upload artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: solrci-image
path: /tmp/solrci-image.tar
Expand All @@ -106,40 +109,39 @@ jobs:
TYPO3_DATABASE_HOST: '127.0.0.1'
TYPO3_DATABASE_USERNAME: 'root'
TYPO3_DATABASE_PASSWORD: 'root'
PHP_CS_FIXER_VERSION: '^3.2.1'
TYPO3_VERSION: ${{ matrix.TYPO3 }}

name: TYPO3 ${{ matrix.TYPO3 }} on PHP ${{ matrix.PHP }}
steps:
# Workaround for issue with actions/checkout@v2 wrong PR commit checkout: See https://github.com/actions/checkout/issues/299#issuecomment-677674415
# Workaround for issue with actions/checkout "wrong PR commit checkout". See: ci_bootstrapping job
-
name: Checkout current state of Pull Request
if: github.event_name == 'pull_request'
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 2
ref: ${{ github.event.pull_request.head.sha }}
-
name: Checkout current state of Branch
if: github.event_name == 'push'
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 2
# End: Workaround for issue with actions/checkout@v2 wrong PR commit checkout
# End: Workaround for issue with actions/checkout...
-
name: Mount RAMFS
run: |
mkdir -p ${{ env.CI_BUILD_DIRECTORY }}
sudo mount -t tmpfs -o size=3G none ${{ env.CI_BUILD_DIRECTORY }}
sudo mount -t tmpfs -o size=1G none ${{ env.CI_BUILD_DIRECTORY }}
sudo mkdir -p ${{ env.CI_BUILD_DIRECTORY }}/data-{solr,mysql} \
&& sudo chown $USER ${{ env.CI_BUILD_DIRECTORY }}/data-mysql \
&& sudo chown 8983:8983 ${{ env.CI_BUILD_DIRECTORY }}/data-solr
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v2
-
name: Download solrci-image from "ci_bootstrapping" job
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: solrci-image
path: /tmp
Expand All @@ -162,36 +164,9 @@ jobs:
with:
php-version: ${{ matrix.PHP }}
coverage: pcov
tools: composer:2.1.14
-
name: Resolve CI build cache key
# CI_CACHE_VERSION is used and can be increased to be able to invalidate caches.
# For example if some composer dependencies added or removed in composer.json or
# in Build/Test/bootstrap.sh
run: |
export CURRENT_TYPO3_VERSION_REFERNCE=$(./Build/Helpers/TYPO3_SOURCE_REFERENCE.sh "$TYPO3_VERSION" --short)
export CURRENT_SOLARIUM_VERSION=$(cat composer.json | jq --raw-output '.require."solarium/solarium"')
export CI_CACHE_VERSION="2023.01.20@00:00"
export CI_BUILD_CACHE_KEY=${{ runner.os }}-PHP:${{ matrix.PHP }}-TYPO3:$TYPO3_VERSION@$CURRENT_TYPO3_VERSION_REFERNCE-SOLARIUM:$CURRENT_SOLARIUM_VERSION-"CI_CACHE_VERSION:"$CI_CACHE_VERSION
echo "COMPOSER_GLOBAL_REQUEREMENTS=$(composer config home)" >> $GITHUB_ENV
echo "CI_BUILD_CACHE_KEY=$CI_BUILD_CACHE_KEY" >> $GITHUB_ENV
echo "The key for actions/cache@v2 is \"$CI_BUILD_CACHE_KEY\""
-
name: Restore ci build caches
id: restore_ci_build_caches
uses: actions/cache@v2
with:
path: |
${{ env.CI_BUILD_DIRECTORY }}/Web
${{ env.CI_BUILD_DIRECTORY }}/bin
${{ env.CI_BUILD_DIRECTORY }}/vendor
${{ env.COMPOSER_GLOBAL_REQUEREMENTS }}
composer.json
composer.lock
key: ${{ env.CI_BUILD_CACHE_KEY }}
tools: composer:2.5.5
-
name: CI-Bootstrap
if: steps.restore_ci_build_caches.outputs.cache-hit != 'true'
run: |
./Build/Test/bootstrap.sh --skip-solr-install
echo "Current Size of EXT:Solr build Artefacts before run: " \
Expand All @@ -206,8 +181,8 @@ jobs:
-
name: Upload code coverage to Scrutinizer
run: |
.Build/bin/ocular code-coverage:upload --format=php-clover coverage.unit.clover
.Build/bin/ocular code-coverage:upload --format=php-clover coverage.integration.clover
ocular code-coverage:upload --format=php-clover coverage.unit.clover
ocular code-coverage:upload --format=php-clover coverage.integration.clover
-
name: Clean up
run: |
Expand All @@ -227,7 +202,7 @@ jobs:
steps:
-
name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
-
Expand Down
8 changes: 5 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
*.cache
.Build
.buildpath
*.cache
.DS_Store
.idea/
.project/
.settings/
atlassian-ide-plugin.xml
composer.lock
Documentation/_make
Documentation-GENERATED-temp
Documentation.HTML
Documentation/_make
index.php
Resources/Public/Documentation/
typo3
typo3_src
typo3conf
typo3temp
typo3_src
uploads
var
vendor
1 change: 1 addition & 0 deletions Build/Test/IntegrationTests.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version="1.0"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
backupGlobals="false"
bootstrap="IntegrationTestsBootstrap.php"
backupStaticAttributes="false"
colors="true"
convertErrorsToExceptions="true"
Expand Down
6 changes: 4 additions & 2 deletions Build/Test/IntegrationTestsBootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@
* The TYPO3 project - inspiring people to share!
*/

call_user_func(function () {
$testbase = new \TYPO3\TestingFramework\Core\Testbase();
use TYPO3\TestingFramework\Core\Testbase;

call_user_func(static function () {
$testbase = new Testbase();
$testbase->defineOriginalRootPath();
$testbase->createDirectory(ORIGINAL_ROOT . 'typo3temp/var/tests');
$testbase->createDirectory(ORIGINAL_ROOT . 'typo3temp/var/transient');
Expand Down
1 change: 1 addition & 0 deletions Build/Test/UnitTests.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version="1.0"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
backupGlobals="false"
bootstrap="UnitTestsBootstrap.php"
backupStaticAttributes="false"
colors="true"
convertErrorsToExceptions="true"
Expand Down
77 changes: 21 additions & 56 deletions Build/Test/bootstrap.sh
Original file line number Diff line number Diff line change
@@ -1,24 +1,13 @@
#!/usr/bin/env bash

if [[ -n ${BASH_SOURCE[0]} ]]; then
SCRIPTPATH=$( cd $(dirname ${BASH_SOURCE[0]}) ; pwd -P )
else
SCRIPTPATH=$( cd $(dirname $0) ; pwd -P )
fi

EXTENSION_ROOTPATH="$SCRIPTPATH/../../"
SOLR_INSTALL_PATH="/opt/solr-tomcat/"

DEFAULT_TYPO3_VERSION="^11.5.14"
DEFAULT_PHP_CS_FIXER_VERSION="^3.2.1"
DEFAULT_TYPO3_VERSION="11"
DEFAULT_TYPO3_DATABASE_HOST="localhost"
DEFAULT_TYPO3_DATABASE_NAME="test"
DEFAULT_TYPO3_DATABASE_USERNAME="root"
DEFAULT_TYPO3_DATABASE_PASSWORD="supersecret"

if [[ $* == *--use-defaults* ]]; then
export TYPO3_VERSION=$DEFAULT_TYPO3_VERSION
export PHP_CS_FIXER_VERSION=$DEFAULT_PHP_CS_FIXER_VERSION
export TYPO3_DATABASE_HOST=$DEFAULT_TYPO3_DATABASE_HOST
export TYPO3_DATABASE_NAME=$DEFAULT_TYPO3_DATABASE_NAME
export TYPO3_DATABASE_USERNAME=$DEFAULT_TYPO3_DATABASE_USERNAME
Expand All @@ -31,11 +20,6 @@ if [[ $* == *--local* ]]; then
if [ -z "$typo3Version" ]; then typo3Version=$DEFAULT_TYPO3_VERSION; fi
export TYPO3_VERSION=$typo3Version

echo -n "Choose a php-cs-fixer version [defaults: " $DEFAULT_PHP_CS_FIXER_VERSION"] : "
read phpCSFixerVersion
if [ -z "$phpCSFixerVersion" ]; then phpCSFixerVersion=$DEFAULT_PHP_CS_FIXER_VERSION; fi
export PHP_CS_FIXER_VERSION=$phpCSFixerVersion

echo -n "Choose a database hostname: [defaults: " $DEFAULT_TYPO3_DATABASE_HOST"] : "
read typo3DbHost
if [ -z "$typo3DbHost" ]; then typo3DbHost=$DEFAULT_TYPO3_DATABASE_HOST; fi
Expand All @@ -57,60 +41,41 @@ if [[ $* == *--local* ]]; then
export TYPO3_DATABASE_PASSWORD=$typo3DbPassword
fi

echo "Using TYPO3 Version: $TYPO3_VERSION"
echo "Using PHP-CS Fixer Version: $PHP_CS_FIXER_VERSION"
echo "Using database host: $TYPO3_DATABASE_HOST"
echo "Using database dbname: $TYPO3_DATABASE_NAME"
echo "Using database user: $TYPO3_DATABASE_USERNAME"
echo "Using database password: $TYPO3_DATABASE_PASSWORD"

if [ -z $TYPO3_VERSION ]; then
echo "Must set env var TYPO3_VERSION (e.g. dev-main or ^11.5)"
echo "Must set env var TYPO3_VERSION (e.g. dev-main or ^12.4)"
exit 1
fi

# Use latest TYPO3 LTS stable version, if version number is compatible with get.typo3.org API
if [[ $TYPO3_VERSION =~ ^[0-9]+$ ]] ; then
TYPO3_VERSION=$("${BASH_SOURCE%/*}/../Helpers/TYPO3_GET_LATEST_VERSION.sh" "$TYPO3_VERSION")
fi

if ! wget --version > /dev/null 2>&1
then
echo "Couldn't find wget."
exit 1
fi

COMPOSER_NO_INTERACTION=1

# Setup TYPO3 environment variables
export TYPO3_PATH_PACKAGES="${EXTENSION_ROOTPATH}.Build/vendor/"
export TYPO3_PATH_WEB="${EXTENSION_ROOTPATH}.Build/Web/"
# Use latest TYPO3 LTS stable version, if version number is compatible with get.typo3.org API
if [[ $TYPO3_VERSION =~ ^[0-9]+$ ]] ; then
TYPO3_VERSION=$("${BASH_SOURCE%/*}/../Helpers/TYPO3_GET_LATEST_VERSION.sh" "$TYPO3_VERSION")
fi

echo "Installing test environment"
echo "Using extension path $EXTENSION_ROOTPATH"
echo "Using package path $TYPO3_PATH_PACKAGES"
echo "Using web path $TYPO3_PATH_WEB"
echo "Using TYPO3 Version: $TYPO3_VERSION"
echo "Using database host: $TYPO3_DATABASE_HOST"
echo "Using database dbname: $TYPO3_DATABASE_NAME"
echo "Using database user: $TYPO3_DATABASE_USERNAME"
echo "Using database password: $TYPO3_DATABASE_PASSWORD"

# Install TYPO3 sources
if [[ $TYPO3_VERSION = *"master"* ]]; then
composer config minimum-stability dev
fi
COMPOSER_NO_INTERACTION=1

if ! composer require --dev --update-with-dependencies --prefer-source \
typo3/cms-core:"$TYPO3_VERSION" \
typo3/cms-backend:"$TYPO3_VERSION" \
typo3/cms-recordlist:"$TYPO3_VERSION" \
typo3/cms-fluid:"$TYPO3_VERSION" \
typo3/cms-fluid-styled-content:"$TYPO3_VERSION" \
typo3/cms-frontend:"$TYPO3_VERSION" \
typo3/cms-extbase:"$TYPO3_VERSION" \
typo3/cms-reports:"$TYPO3_VERSION" \
typo3/cms-scheduler:"$TYPO3_VERSION" \
typo3/cms-tstemplate:"$TYPO3_VERSION" \
typo3/cms-install:"$TYPO3_VERSION"
echo "Installing test environment"
if ! composer tests:setup
then
echo "The test environment could not be installed by composer as expected. Please fix this issue."
exit 1
fi

mkdir -p $TYPO3_PATH_WEB/uploads $TYPO3_PATH_WEB/typo3temp
echo "Install third party tools globally:"
export PATH=$PATH:$(composer config --global home)/vendor/bin
if ! composer tests:setup:global-require
then
"The test environment could not be installed by composer as expected. Please fix this issue."
exit 1
fi
Loading