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

[FEATURE] Added support for TYPO3 13, dropped support for 10 and PHP7 #579

Merged
merged 5 commits into from
Oct 15, 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
9 changes: 0 additions & 9 deletions .Build/phpstan.cms10.neon

This file was deleted.

16 changes: 15 additions & 1 deletion .Build/phpstan.cms11.neon
Original file line number Diff line number Diff line change
@@ -1,7 +1,21 @@
parameters:
level: 0
level: 8
paths:
- ../Classes
- ../Configuration
excludePaths:
- ../Classes/Updates
ignoreErrors:
- '#Parameter \$event of method#'
- '#TYPO3\\CMS\\Frontend\\Page\\PageInformation#'
- '#TYPO3\\CMS\\Backend\\View\\BackendViewFactory#'
- '#TYPO3\\CMS\\Backend\\Template\\ModuleTemplate#'
- '#TYPO3\\CMS\\Extbase\\Mvc\\RequestInterface#'
- '#TYPO3\\CMS\\Core\\View\\ViewInterface#'
- '#TYPO3\\CMS\\Core\\Domain\\Repository\\PageRepository::getLanguageOverlay#'
- '#frontend.page.information#'
- '#ModifyPageLayoutContentEvent#'
- '#AfterCacheableContentIsGeneratedEvent#'
- '#loadJavaScriptModule#'
- '#getLanguageCode#'
- '#addJsInlineCode#'
7 changes: 6 additions & 1 deletion .Build/phpstan.cms12.neon
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
parameters:
level: 0
level: 8
paths:
- ../Classes
- ../Configuration
excludePaths:
- ../Classes/Updates
ignoreErrors:
- '#TYPO3\\CMS\\Backend\\ViewHelpers\\ModuleLayoutViewHelper#'
- '#TYPO3\\CMS\\Frontend\\Page\\PageInformation#'
- '#frontend.page.information#'
- '#protected method getRecordOverlay#'
15 changes: 15 additions & 0 deletions .Build/phpstan.cms13.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
parameters:
level: 8
paths:
- ../Classes
- ../Configuration
excludePaths:
- ../Classes/Updates
ignoreErrors:
- '#TYPO3\\CMS\\Backend\\ViewHelpers\\ModuleLayoutViewHelper#'
- '#TYPO3\\CMS\\Backend\\Template\\ModuleTemplate#'
- '#getRecordOverlay#'
- '#loadRequireJsModule#'
typo3:
requestGetAttributeMapping:
frontend.page.information: TYPO3\CMS\Frontend\Page\PageInformation
64 changes: 44 additions & 20 deletions .ddev/apache/apache-site.conf
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ ServerName yoast-seo.ddev.site

RewriteEngine On
RewriteCond %{HTTP:X-Forwarded-Proto} =https
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} -d
RewriteRule ^(.+[^/])$ https://%{HTTP_HOST}$1/ [redirect,last]
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} -d
RewriteRule ^(.+[^/])$ https://%{HTTP_HOST}$1/ [redirect,last]

SetEnvIf X-Forwarded-Proto "https" HTTPS=on

Expand Down Expand Up @@ -47,8 +47,8 @@ ServerName yoast-seo.ddev.site

RewriteEngine On
RewriteCond %{HTTP:X-Forwarded-Proto} =https
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} -d
RewriteRule ^(.+[^/])$ https://%{HTTP_HOST}$1/ [redirect,last]
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} -d
RewriteRule ^(.+[^/])$ https://%{HTTP_HOST}$1/ [redirect,last]

SetEnvIf X-Forwarded-Proto "https" HTTPS=on

Expand Down Expand Up @@ -78,16 +78,35 @@ ServerName yoast-seo.ddev.site

</VirtualHost>

<VirtualHost *:80>
SetEnvIf X-Forwarded-Proto "https" HTTPS=on

DocumentRoot /var/www/yoast_seo/Documentation-GENERATED-temp/Result/project/0.0.0
ServerAlias docs.yoast-seo.ddev.site

<Directory "/var/www/yoast_seo/Documentation-GENERATED-temp/Result/project/0.0.0/">
AllowOverride All
Allow from All

DirectoryIndex Index.html
</Directory>

ErrorLog /dev/stdout
Alias "/phpstatus" "/var/www/phpstatus.php"
</VirtualHost>

<VirtualHost *:80>
RewriteEngine On
RewriteCond %{HTTP:X-Forwarded-Proto} =https
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} -d
RewriteRule ^(.+[^/])$ https://%{HTTP_HOST}$1/ [redirect,last]
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} -d
RewriteRule ^(.+[^/])$ https://%{HTTP_HOST}$1/ [redirect,last]

DocumentRoot /var/www/html/v9/public
ServerAlias v9.yoast-seo.ddev.site
SetEnvIf X-Forwarded-Proto "https" HTTPS=on

DocumentRoot /var/www/html/v11/public
ServerAlias v11.yoast-seo.ddev.site

<Directory "/var/www/html/v9/">
<Directory "/var/www/html/v11/">
AllowOverride All
Allow from All
</Directory>
Expand All @@ -100,13 +119,15 @@ ServerName yoast-seo.ddev.site
<VirtualHost *:80>
RewriteEngine On
RewriteCond %{HTTP:X-Forwarded-Proto} =https
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} -d
RewriteRule ^(.+[^/])$ https://%{HTTP_HOST}$1/ [redirect,last]
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} -d
RewriteRule ^(.+[^/])$ https://%{HTTP_HOST}$1/ [redirect,last]

SetEnvIf X-Forwarded-Proto "https" HTTPS=on

DocumentRoot /var/www/html/v10/public
ServerAlias v10.yoast-seo.ddev.site
DocumentRoot /var/www/html/v12/public
ServerAlias v12.yoast-seo.ddev.site

<Directory "/var/www/html/v10/">
<Directory "/var/www/html/v12/">
AllowOverride All
Allow from All
</Directory>
Expand All @@ -119,13 +140,15 @@ ServerName yoast-seo.ddev.site
<VirtualHost *:80>
RewriteEngine On
RewriteCond %{HTTP:X-Forwarded-Proto} =https
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} -d
RewriteRule ^(.+[^/])$ https://%{HTTP_HOST}$1/ [redirect,last]
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} -d
RewriteRule ^(.+[^/])$ https://%{HTTP_HOST}$1/ [redirect,last]

DocumentRoot /var/www/html/v11/public
ServerAlias v11.yoast-seo.ddev.site
SetEnvIf X-Forwarded-Proto "https" HTTPS=on

<Directory "/var/www/html/v11/">
DocumentRoot /var/www/html/v13/public
ServerAlias v13.yoast-seo.ddev.site

<Directory "/var/www/html/v13/">
AllowOverride All
Allow from All
</Directory>
Expand All @@ -134,4 +157,5 @@ ServerName yoast-seo.ddev.site
CustomLog ${APACHE_LOG_DIR}/access.log combined
Alias "/phpstatus" "/var/www/phpstatus.php"
</VirtualHost>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
3 changes: 2 additions & 1 deletion .ddev/commands/host/launch-docs
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/bin/bash

FULLURL="https://docs.${DDEV_SITENAME}.ddev.site"

FULLURL="Documentation-GENERATED-temp/Result/project/0.0.0/Index.html"
echo "Opening \"https://docs.${DDEV_SITENAME}.ddev.site\"..."

case $OSTYPE in
linux-gnu)
Expand Down
10 changes: 10 additions & 0 deletions .ddev/commands/web/composer-install-dashboard
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

valid_versions=("11" "12" "13")

if [[ ! " ${valid_versions[@]} " =~ " $1 " ]]; then
echo "Invalid version. Please use one of the following: ${valid_versions[@]}"
exit 1
fi

composer req typo3/cms-dashboard:"^$1" -n -d /var/www/html/v$1
10 changes: 10 additions & 0 deletions .ddev/commands/web/composer-remove-dashboard
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

valid_versions=("11" "12" "13")

if [[ ! " ${valid_versions[@]} " =~ " $1 " ]]; then
echo "Invalid version. Please use one of the following: ${valid_versions[@]}"
exit 1
fi

composer remove typo3/cms-dashboard -n -d /var/www/html/v$1
10 changes: 10 additions & 0 deletions .ddev/commands/web/composer-update-all
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

valid_versions=("11" "12" "13")

if [[ ! " ${valid_versions[@]} " =~ " $1 " ]]; then
echo "Invalid version. Please use one of the following: ${valid_versions[@]}"
exit 1
fi

composer update -n -d /var/www/html/v$1
4 changes: 2 additions & 2 deletions .ddev/commands/web/install-all
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

ABSOLUTE_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/$(basename "${BASH_SOURCE[0]}/.")"

$ABSOLUTE_PATH/install-v13
$ABSOLUTE_PATH/install-v12
$ABSOLUTE_PATH/install-v11
$ABSOLUTE_PATH/install-v10
$ABSOLUTE_PATH/install-v9
33 changes: 0 additions & 33 deletions .ddev/commands/web/install-v10

This file was deleted.

13 changes: 6 additions & 7 deletions .ddev/commands/web/install-v11
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@
VERSION=v11

rm -rf /var/www/html/$VERSION/*
composer init -n -d /var/www/html/$VERSION
mkdir -p /var/www/html/$VERSION/
echo "{}" > /var/www/html/$VERSION/composer.json
composer config extra.typo3/cms.web-dir public -d /var/www/html/$VERSION
composer config repositories.$EXTENSION_KEY path ../../$EXTENSION_KEY -d /var/www/html/$VERSION
composer req t3/cms:'^11.0' $PACKAGE_NAME:'*@dev' --no-progress --no-suggest -n -d /var/www/html/$VERSION

composer config --no-plugins allow-plugins.typo3/cms-composer-installers true -d /var/www/html/$VERSION
composer config --no-plugins allow-plugins.typo3/class-alias-loader true -d /var/www/html/$VERSION
composer req t3/cms:'^11' $PACKAGE_NAME:'*@dev' --no-progress -n -d /var/www/html/$VERSION

cd /var/www/html/$VERSION

Expand All @@ -23,11 +25,8 @@ vendor/bin/typo3cms configuration:set 'MAIL/transport_smtp_server' 'localhost:10
vendor/bin/typo3cms configuration:set 'GFX/processor' 'ImageMagick'
vendor/bin/typo3cms configuration:set 'GFX/processor_path' '/usr/bin/'
vendor/bin/typo3cms configuration:set 'GFX/processor_path_lzw' '/usr/bin/'
vendor/bin/typo3cms install:generatepackagestates

sed -i -e "s/base: ht\//base: \//g" /var/www/html/$VERSION/config/sites/main/config.yaml
sed -i -e 's/base: \/en\//base: \//g' /var/www/html/$VERSION/config/sites/main/config.yaml

cp ~/favicon.ico ./public

vendor/bin/typo3cms cache:flush
vendor/bin/typo3cms cache:flush
32 changes: 32 additions & 0 deletions .ddev/commands/web/install-v12
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/bin/bash

VERSION=v12

rm -rf /var/www/html/$VERSION/*
mkdir -p /var/www/html/$VERSION/
echo "{}" > /var/www/html/$VERSION/composer.json
composer config extra.typo3/cms.web-dir public -d /var/www/html/$VERSION
composer config repositories.$EXTENSION_KEY path ../../$EXTENSION_KEY -d /var/www/html/$VERSION
composer config --no-plugins allow-plugins.typo3/cms-composer-installers true -d /var/www/html/$VERSION
composer config --no-plugins allow-plugins.typo3/class-alias-loader true -d /var/www/html/$VERSION
composer req t3/cms:'^12' $PACKAGE_NAME:'*@dev' --no-progress -n -d /var/www/html/$VERSION

cd /var/www/html/$VERSION

TYPO3_INSTALL_DB_DBNAME=$VERSION
vendor/bin/typo3 install:setup -n --database-name $VERSION
vendor/bin/typo3 configuration:set 'BE/debug' 1
vendor/bin/typo3 configuration:set 'FE/debug' 1
vendor/bin/typo3 configuration:set 'SYS/devIPmask' '*'
vendor/bin/typo3 configuration:set 'SYS/displayErrors' 1
vendor/bin/typo3 configuration:set 'SYS/trustedHostsPattern' '.*.*'
vendor/bin/typo3 configuration:set 'MAIL/transport' 'smtp'
vendor/bin/typo3 configuration:set 'MAIL/transport_smtp_server' 'localhost:1025'
vendor/bin/typo3 configuration:set 'MAIL/defaultMailFromAddress' '[email protected]'
vendor/bin/typo3 configuration:set 'GFX/processor' 'ImageMagick'
vendor/bin/typo3 configuration:set 'GFX/processor_path' '/usr/bin/'

sed -i -e "s/base: ht\//base: \//g" /var/www/html/$VERSION/config/sites/main/config.yaml
sed -i -e 's/base: \/en\//base: \//g' /var/www/html/$VERSION/config/sites/main/config.yaml

vendor/bin/typo3 cache:flush
33 changes: 33 additions & 0 deletions .ddev/commands/web/install-v13
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/bin/bash

VERSION=v13

rm -rf /var/www/html/$VERSION/*
mkdir -p /var/www/html/$VERSION/
echo "{}" > /var/www/html/$VERSION/composer.json
composer config extra.typo3/cms.web-dir public -d /var/www/html/$VERSION
composer config repositories.$EXTENSION_KEY path ../../$EXTENSION_KEY -d /var/www/html/$VERSION
composer config --no-plugins allow-plugins.typo3/cms-composer-installers true -d /var/www/html/$VERSION
composer config --no-plugins allow-plugins.typo3/class-alias-loader true -d /var/www/html/$VERSION
composer req t3/cms:'^13' $PACKAGE_NAME:'*@dev' --no-progress -n -d /var/www/html/$VERSION

cd /var/www/html/$VERSION

mysql -h db -u root -p"root" -e "CREATE DATABASE ${VERSION};"

TYPO3_INSTALL_DB_DBNAME=$VERSION
vendor/bin/typo3 setup -n --dbname=$VERSION --password=$TYPO3_DB_PASSWORD --create-site="https://${VERSION}.yoast-seo.ddev.site" --admin-user-password=$TYPO3_SETUP_ADMIN_PASSWORD
vendor/bin/typo3 configuration:set 'BE/debug' 1
vendor/bin/typo3 configuration:set 'FE/debug' 1
vendor/bin/typo3 configuration:set 'SYS/devIPmask' '*'
vendor/bin/typo3 configuration:set 'SYS/displayErrors' 1
vendor/bin/typo3 configuration:set 'SYS/trustedHostsPattern' '.*.*'
vendor/bin/typo3 configuration:set 'MAIL/transport' 'smtp'
vendor/bin/typo3 configuration:set 'MAIL/transport_smtp_server' 'localhost:1025'
vendor/bin/typo3 configuration:set 'GFX/processor' 'ImageMagick'
vendor/bin/typo3 configuration:set 'GFX/processor_path' '/usr/bin/'
vendor/bin/typo3 configuration:set 'SYS/features/security.backend.enforceReferrer' 0

cp ~/favicon.ico ./public

vendor/bin/typo3 cache:flush
34 changes: 0 additions & 34 deletions .ddev/commands/web/install-v9

This file was deleted.

Loading