-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TASK] Merge release/4.0.0 to main (#118)
Add TYPO3 13 support
- Loading branch information
1 parent
e4e6456
commit f7343f4
Showing
26 changed files
with
377 additions
and
132 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/bash | ||
|
||
## Description: [ExtDev] Install TYPO3 13 integration instance. | ||
## Usage: install | ||
## Example: "ddev install 13" | ||
|
||
set +x | ||
set -e | ||
|
||
source .ddev/test/utils-install.sh | ||
install_start "13" | ||
|
||
# remove next two lines later after stable version of helhum/typo3-console START | ||
composer config repositories.helhum/typo3-console vcs https://github.com/bmack/TYPO3-Console --working-dir $BASE_PATH | ||
cp ".ddev/test/files/patches/typo3-cms-core-review-85198.patch" $BASE_PATH/patches/ | ||
composer req typo3/cms-backend:'^13.3' typo3/cms-core:'^13.3' typo3/cms-extbase:'^13.3' typo3/cms-filelist:'^13.3' \ | ||
typo3/cms-fluid:'^13.3' typo3/cms-frontend:'^13.3' typo3/cms-recycler:'^13.3' typo3/cms-tstemplate:'^13.3' \ | ||
typo3/cms-info:'^13.3' typo3/cms-lowlevel:'^13.3' typo3/cms-rte-ckeditor:'^13.3' typo3/cms-impexp:'^13.3' \ | ||
typo3/cms-install:'^13.3' \ | ||
helhum/typo3-console:'dev-issue/1169' \ | ||
cweagans/composer-patches:'^1.7.3' georgringer/news:'dev-12-13' \ | ||
sourcebroker/t3apinews:'^1.0.0' v/site:'^1.0.0' \ | ||
sourcebroker/t3api:'@dev' \ | ||
--no-progress --no-interaction --working-dir "$BASE_PATH" | ||
|
||
install_end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
.ddev/test/files/patches/typo3-cms-core-review-85198.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
From c7b62d663c886c7448f91fe7e263b63f97a3aa9b Mon Sep 17 00:00:00 2001 | ||
From: Garvin Hicking <[email protected]> | ||
Date: Wed, 10 Jul 2024 09:56:38 +0200 | ||
Subject: [PATCH] [BUGFIX] Fix composer PackageArtifact packagePath resolve for root pkgs | ||
|
||
With #103898 the handling of `handleRootPackage()` was streamlined. | ||
|
||
This lead to root packages' paths not being set to the base dir | ||
of the composer installation any more. | ||
|
||
The missing code is now added again. | ||
|
||
Resolves: #104345 | ||
Related: #103898 | ||
Releases: main, 12.4 | ||
Change-Id: I8c66d88ffcacddc2c825964d393d7446db551e68 | ||
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/85198 | ||
Tested-by: Nikita Hovratov <[email protected]> | ||
Tested-by: core-ci <[email protected]> | ||
Reviewed-by: Nikita Hovratov <[email protected]> | ||
Tested-by: Helmut Hummel <[email protected]> | ||
Reviewed-by: Helmut Hummel <[email protected]> | ||
--- | ||
|
||
diff --git a/Classes/Composer/PackageArtifactBuilder.php b/Classes/Composer/PackageArtifactBuilder.php | ||
index 1a4848a..7aab94d 100644 | ||
--- a/Classes/Composer/PackageArtifactBuilder.php | ||
+++ b/Classes/Composer/PackageArtifactBuilder.php | ||
@@ -181,7 +181,7 @@ | ||
$usedExtensionKeys = []; | ||
|
||
return array_map( | ||
- function (array $packageAndPath) use (&$usedExtensionKeys): array { | ||
+ function (array $packageAndPath) use ($rootPackage, &$usedExtensionKeys): array { | ||
[$composerPackage, $packagePath] = $packageAndPath; | ||
$packageName = $composerPackage->getName(); | ||
$packagePath = GeneralUtility::fixWindowsFilePath($packagePath); | ||
@@ -210,6 +210,10 @@ | ||
$usedExtensionKeys[$extensionKey] = $packageName; | ||
unset($this->availableComposerPackageKeys[$packageName]); | ||
$this->composerNameToPackageKeyMap[$packageName] = $extensionKey; | ||
+ if ($composerPackage === $rootPackage) { | ||
+ // The root package's path is the Composer base dir | ||
+ $packagePath = $this->config->get('base-dir'); | ||
+ } | ||
// Add extension key to the package map for later reference | ||
return [$composerPackage, $packagePath, $extensionKey]; | ||
}, |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
function install_start() { | ||
check_ddev_environment | ||
setup_environment "$1" | ||
create_symlinks_main_extension | ||
create_symlinks_additional_extensions | ||
setup_composer | ||
} | ||
|
||
function install_end() { | ||
setup_typo3 | ||
import_data | ||
update_typo3 | ||
} | ||
|
||
function check_ddev_environment() { | ||
if [ -z "$DDEV_PROJECT" ]; then | ||
echo "This script must be run inside a DDEV web container." | ||
exit 1 | ||
fi | ||
} | ||
|
||
function setup_environment() { | ||
local version=$1 | ||
BASE_PATH=".test/$version" | ||
rm -rf "$BASE_PATH" | ||
mkdir -p "$BASE_PATH/src/$EXTENSION_KEY" | ||
export DATABASE="database_$version" | ||
export BASE_PATH | ||
export VERSION="$version" | ||
export TYPO3_BIN="$BASE_PATH/vendor/bin/typo3" | ||
mysql -uroot -proot -e "DROP DATABASE IF EXISTS $DATABASE" | ||
} | ||
|
||
function create_symlinks_main_extension() { | ||
local exclusions=(".*" "Documentation" "Documentation-GENERATED-temp" "var") | ||
for item in ./*; do | ||
local base_name=$(basename "$item") | ||
for exclusion in "${exclusions[@]}"; do | ||
if [[ $base_name == "$exclusion" ]]; then | ||
continue 2 | ||
fi | ||
done | ||
ln -sr "$item" "$BASE_PATH/src/$EXTENSION_KEY/$base_name" | ||
done | ||
} | ||
|
||
function create_symlinks_additional_extensions() { | ||
for dir in .ddev/test/files/src/*/; do | ||
ln -sr "$dir" "$BASE_PATH/src/$(basename "$dir")" | ||
done | ||
} | ||
|
||
function setup_composer() { | ||
composer init --name="sourcebroker/typo3-$VERSION" --description="TYPO3 $VERSION" --no-interaction --working-dir "$BASE_PATH" | ||
composer config extra.typo3/cms.web-dir public --working-dir "$BASE_PATH" | ||
composer config repositories.src path 'src/*' --working-dir "$BASE_PATH" | ||
composer config --no-interaction allow-plugins.typo3/cms-composer-installers true --working-dir "$BASE_PATH" | ||
composer config --no-interaction allow-plugins.typo3/class-alias-loader true --working-dir "$BASE_PATH" | ||
composer config --no-plugins allow-plugins.cweagans/composer-patches true --working-dir "$BASE_PATH" | ||
mkdir -p "$BASE_PATH/patches" | ||
jq '.extra.patches += {"typo3/cms-impexp": {"Disable error on new sys_file warning.": "patches/typo3-cms-impexp-disable-error-on-sys-file-warning.patch"}}' "$BASE_PATH/composer.json" > "$BASE_PATH/composer.json.tmp" && mv "$BASE_PATH/composer.json.tmp" "$BASE_PATH/composer.json" | ||
cp ".ddev/test/files/patches/typo3-cms-impexp-disable-error-on-sys-file-warning.patch" "$BASE_PATH/patches/" | ||
} | ||
|
||
function setup_typo3() { | ||
$TYPO3_BIN install:setup -n --database-name "$DATABASE" | ||
$TYPO3_BIN configuration:set 'BE/debug' 1 | ||
$TYPO3_BIN configuration:set 'BE/lockSSL' true | ||
$TYPO3_BIN configuration:set 'FE/debug' 1 | ||
$TYPO3_BIN configuration:set 'SYS/devIPmask' '*' | ||
$TYPO3_BIN configuration:set 'SYS/displayErrors' 1 | ||
$TYPO3_BIN configuration:set 'SYS/trustedHostsPattern' '.*.*' | ||
$TYPO3_BIN configuration:set 'MAIL/transport' 'smtp' | ||
$TYPO3_BIN configuration:set 'MAIL/transport_smtp_server' 'localhost:1025' | ||
$TYPO3_BIN configuration:set 'GFX/processor' 'ImageMagick' | ||
$TYPO3_BIN configuration:set 'GFX/processor_path' '/usr/bin/' | ||
ln -srf ".ddev/test/files/config/sites/main/config.yaml" "$BASE_PATH/config/sites/main/config.yaml" | ||
} | ||
|
||
function import_data() { | ||
.ddev/commands/web/data import "$VERSION" | ||
} | ||
|
||
function update_typo3() { | ||
$TYPO3_BIN database:updateschema | ||
$TYPO3_BIN cache:flush | ||
} |
Oops, something went wrong.