Skip to content

thomaskieslich/t3upgrader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Upgrate TYPO3 Versions

Based on:

https://github.com/peter-neumann-dev/ddev-cms-upgrader

https://typo3.org/article/automatic-typo3-updates-across-several-major-versions-with-ddev

Thanks for this work.

I changed the Concept to move the Processes outside of ddev and other things. The Main Goal is to have one branch for each TYPO3 version and this Script to run the Upgrades over all Version Branches.

  • can change the DB Version between Versions
  • can use custom script and DB Fixtures for each version
  • can be overwritten in versions-override Folder

The code adjustments for each version still have to be made manually. However, testing and upgrading with the current live data is much easier. I usually use https://github.com/thomaskieslich/t3static to test and customise the code.

Install

  1. Create branch with the same Name like the current/legacy TYPO3 Version.
git checkout -b typo3-11.5
#or with subpath
git checkout -b upgrade/typo3-11.5
  1. Add this to root .gitignore to have the same code in all project Branches.
# TYPO3 Upgrade
# t3upgrader https://github.com/thomaskieslich/t3upgrader
/t3upgrader
  1. Copy/Clone to Project Root

git clone [email protected]:thomaskieslich/t3upgrader.git

  1. copy /t3upgrader/.env.dist to /t3upgrader/.env and Update the variables.

  2. create .env.t3upgrader in Project Root

# TYPO3 Version(s) 7.6 8.7 10.4 11.5 12.4 13.4 to Upgrade
CMS_VERSIONS='11.5'

# TYPO3 Version of Current Branch
CURRENT_CMS_VERSION='11.5'

CMS_VERSIONS and CURRENT_CMS_VERSION should be identical in the Version you Start.

Always add only the respective version of the current branch in the .env.upgrader file That means: if you start in branch 11.5, versions in .env.upgrader file are only "11.5" If you create (or switch) to the next branch 12.4, versions in .env file should "11.5 12.4" In the next branch 13.4, version should be "11.5 12.4 13.4" and so on … That gives you the possibility of running the upgrade only up to the current branch. In Development testing you can set both versions to the current TYPO3 Version only.

Run TYPO3 Upgrades from project Root

./t3upgrader/t3upgrade.sh

Explanations

.env

CMS_VERSIONS

Is changed per update branch (see below). All versions from starting version to current branch version

CMS_VERSIONS='10.4 11.5 12.4'

CURRENT_CMS_VERSION

Current branch version

Branch: typo3-11.5

CURRENT_CMS_VERSION='11.5'

Branch: typo3-12.4

CURRENT_CMS_VERSION='12.4'

t3upgrader/.env

BASE_CMS_VERSION Starting version

BASE_CMS_VERSION='10.4'

Branches

Branches are expected with following names {BRANCH_PREFIX}-{CMS_VERSIONS[0]} {BRANCH_PREFIX}-{CMS_VERSIONS[1]} etc.

BRANCH_PREFIX='typo3'
CMS_VERSIONS='10.4 11.5'

typo3-10.4 typo3-11.5

t3upgrader/versions/xx.xx

db-fixtures.sql Possibility to set db changings

Additionally you can put additional scripts there and add it to update-script.sh (example below)

Example steps v10 to v12

  1. t3upgrader/.env adjust all values if necessary (CMS_VERSIONS and CURRENT_CMS_VERSION remain commented out)
    • BASE_CMS_VERSION='10.4' (Starting version)
  2. run sync script
  3. Checkout new branch for 10.4: git checkout -b typo3-10.4
  4. Create root-.env with CMS_VERSIONS and CURRENT_CMS_VERSION
    • CMS_VERSIONS='10.4'
    • CURRENT_CMS_VERSION='10.4'
  5. commit state, because upgrader will switch between branches
  6. ./t3upgrader/t3upgrade.sh
  7. Checkout new branch for 11.5: git checkout -b typo3-11.5
  8. Adjust root-.env
    • CMS_VERSIONS='10.4 11.5'
    • CURRENT_CMS_VERSION='11.5’
  9. set needed package versions and php version to composer.json, set needed php version to .ddev/config
    1. ddev restart
    2. ddev composer u to test that all versions are correct
  10. commit state, because upgrader will switch between branches
  11. ./t3upgrader/t3upgrade.sh
  12. Checkout new branch for 12.4: git checkout -b typo3-12.4
  13. Root-.env anpassen
    • CMS_VERSIONS='10.4 11.5 12.4’
    • CURRENT_CMS_VERSION='12.4’
  14. set needed package versions and php version to composer.json, set needed php version to .ddev/config
    1. ddev restart
    2. ddev composer u to test that all versions are correct
  15. commit state, because upgrader will switch between branches
  16. ./t3upgrader/t3upgrade.sh

Additional migrations

Example: Migration of gridlements to container at v12

  1. remove gridelementsteam/gridelements from composer.json
  2. add b13/container to composer.json
  3. create migration script and put it in t3upgrader/versions/x.x
  4. Add line to upgrade-script.sh inside t3upgrader/versions/x.x to run script
  5. optional: you can put the lines directly in upgrade-script.sh

Example

ddev typo3 gridtocontainer:migrateall 1 container_2columns_8-4 clean 0,1 200,201
ddev typo3 gridtocontainer:migrateall 2 container_2columns_6-6 clean 0,1 200,201
ddev typo3 gridtocontainer:migrateall 3 container_4columns_3-3-3-3 clean 0,1,2,3 200,201,202,203
ddev typo3 gridtocontainer:migrateall 4 container_3columns_4-4-4 clean 0,1,2 200,201,202

Keep at specific version

You can set the CMS_VERSIONS to a specific version, so you can run the upgrader only for that one, if you need it

CMS_VERSIONS='11.5'
CURRENT_CMS_VERSION='11.5'
``

About

Upgrade TYPO3 over multiple Versions.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages