Drupal 8 zu Drupal 9 Migration: Unterschied zwischen den Versionen
Erscheinungsbild
Haas (Diskussion | Beiträge) |
Haas (Diskussion | Beiträge) |
||
| (12 dazwischenliegende Versionen von 2 Benutzern werden nicht angezeigt) | |||
| Zeile 37: | Zeile 37: | ||
==Alle== | ==Alle== | ||
composer.json | * '''von D9/dev9''' -> "''patches''" Ordner kopieren in '''D9/Projekt''' | ||
* '''D9/Projekt'''/composer.json | |||
'''ersetzten''' | '''ersetzten''' | ||
<syntaxhighlight line='line' lang="bash"> | <syntaxhighlight line='line' lang="bash"> | ||
| Zeile 109: | Zeile 110: | ||
} | } | ||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||
D9 Lokal nach fertiggestelltem Upgrade | D9 Lokal nach fertiggestelltem Upgrade | ||
<syntaxhighlight line='line' lang="bash"> | <syntaxhighlight line='line' lang="bash"> | ||
patches && composer update && drush updb && drush cr | |||
drush sql-dump > DB/DB_D9.sql | drush sql-dump > DB/DB_D9.sql | ||
drush cex -y | drush cex -y | ||
| Zeile 125: | Zeile 122: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Online | ==Zum Online Stellen== | ||
* <code>web/core/vendor</code> | *<big>ONLINE [Ausser EGW]</big> | ||
* <code>web/core/modules/</code> | <big>BEVOR</big> Online Stellen folgende Ordner vom <big>ONLINE</big> löschen | ||
* <code>web/themes/contrib/</code> | *<code>web/core/vendor</code> | ||
*<code>web/core/modules/</code> | |||
*<code>web/themes/contrib/</code> | |||
*<big>D9 Lokal</big> | |||
<code>sync | <code>sync PROJEKTNAME -d</code> | ||
<code>sync PROJEKTNAME </code> | |||
*Online | |||
<syntaxhighlight line='line' lang="bash"> | <syntaxhighlight line='line' lang="bash"> | ||
drush updb -y | drush updb -y | ||
drush theme:enable gin | drush theme:enable gin | ||
en -y gin_toolbar | drush en -y gin_toolbar | ||
drush cim | drush cim | ||
drush cr | drush cr | ||
| Zeile 144: | Zeile 141: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
===Nur für EGW=== | ===<big>Nur für EGW</big>=== | ||
<syntaxhighlight line='line' lang="bash"> | <syntaxhighlight line='line' lang="bash"> | ||
composer require 'drupal/computed_field:^3.0@alpha' | composer require 'drupal/computed_field:^3.0@alpha' | ||
| Zeile 157: | Zeile 154: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Module | Module Aktuallisieren default_config | ||
<syntaxhighlight line='line' lang="bash"> | <syntaxhighlight line='line' lang="bash"> | ||
cd web/modules/custom/default_config | |||
git pull | |||
</syntaxhighlight> | </syntaxhighlight> | ||
| Zeile 177: | Zeile 175: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
==Pre | ==Pre rsync== | ||
<syntaxhighlight line='line' lang="bash"> | <syntaxhighlight line='line' lang="bash"> | ||
$live chmod -R 755 web/modules/custom/ | $live chmod -R 755 web/modules/custom/ | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Aktuelle Version vom 7. Juni 2022, 10:00 Uhr
Grundlage
- Scriptpfad
~/_scripts/d9_upgrade - Script Start
./d9_upgrade.sh PROJEKTNAME
Migration Vorbereite
- Die Webseite vorab Auf den neusten Stand bringen $lokal
composer update -W - DB Update $lokal
drush updb - Synchronisieren $local
sync PROJETNAME
Mögliche updates die manuell gemacht werden müssen:
composer require 'drupal/linkit:^6.0@beta'
composer require 'drupal/field_formatter_filter:^2.0'
composer require 'drupal/backup_migrate:^5.0'
composer require 'drupal/db_maintenance:^2.0'
composer require 'drupal/single_datetime:1.x-dev@dev'
composer require 'drupal/computed_field:^3.0@alpha'
composer require 'drupal/crop:^2.1'
composer require 'drupal/field_group:^3.2'
composer require 'drupal/responsive_menu:^4.4'
wenn devel nicht aktuell ist:
zuerst kint deinstallieren
drush pm:uninstall kint
composer remove drupal/kint --no-update
composer require kint-php/kint
composer require 'drupal/devel:^4.1'
Nur EGW
composer require 'drupal/linkit:^6.0@beta' 'drupal/field_formatter_filter:^2.0' 'drupal/single_datetime:1.x-dev@dev' 'drupal/computed_field:^3.0@alpha'
composer rem drupal/date_range_picker
Alle
- von D9/dev9 -> "patches" Ordner kopieren in D9/Projekt
- D9/Projekt/composer.json
ersetzten
"conflict": {
"drupal/drupal": "*"
},
"minimum-stability": "dev",
"prefer-stable": true,
"config": {
"sort-packages": true
},
"extra": {
"enable-patching": true,
"patches-file": "patches/composer.json",
"drupal-scaffold": {
"locations": {
"web-root": "web/"
}
},
"installer-paths": {
"web/core": [
"type:drupal-core"
],
"web/libraries/{$name}": [
"type:drupal-library"
],
"web/modules/contrib/{$name}": [
"type:drupal-module"
],
"web/profiles/contrib/{$name}": [
"type:drupal-profile"
],
"web/themes/contrib/{$name}": [
"type:drupal-theme"
],
"drush/Commands/contrib/{$name}": [
"type:drupal-drush"
],
"web/modules/custom/{$name}": [
"type:drupal-custom-module"
],
"web/themes/custom/{$name}": [
"type:drupal-custom-theme"
]
},
"drupal-core-project-message": {
"include-keys": [
"homepage",
"support"
],
"post-create-project-cmd-message": [
"<bg=blue;fg=white> </>",
"<bg=blue;fg=white> Congratulations, you’ve installed the Drupal codebase </>",
"<bg=blue;fg=white> from the drupal/recommended-project template! </>",
"<bg=blue;fg=white> </>",
"",
"<bg=yellow;fg=black>Next steps</>:",
" * Install the site: https://www.drupal.org/docs/8/install",
" * Read the user guide: https://www.drupal.org/docs/user_guide/en/index.html",
" * Get support: https://www.drupal.org/support",
" * Get involved with the Drupal community:",
" https://www.drupal.org/getting-involved",
" * Remove the plugin that prints this message:",
" composer remove drupal/core-project-message"
]
},
"merge-plugin": {
"include": [
"web/modules/contrib/webform/composer.libraries.json"
]
}
}
D9 Lokal nach fertiggestelltem Upgrade
patches && composer update && drush updb && drush cr
drush sql-dump > DB/DB_D9.sql
drush cex -y
git add .
git commit -m "D9 Upgrade lokal abgeschlossen"
git push origin master
Zum Online Stellen
- ONLINE [Ausser EGW]
BEVOR Online Stellen folgende Ordner vom ONLINE löschen
web/core/vendorweb/core/modules/web/themes/contrib/- D9 Lokal
sync PROJEKTNAME -d
sync PROJEKTNAME
- Online
drush updb -y
drush theme:enable gin
drush en -y gin_toolbar
drush cim
drush cr
drush locale:check && drush locale:update
Nur für EGW
composer require 'drupal/computed_field:^3.0@alpha'
composer require 'drupal/field_formatter_filter:^2.0'
composer require 'drupal/linkit:^6.0@beta'
composer require 'drupal/single_datetime:^1.8@beta'
verteilen
drush pmu -y configuration_import
Module Aktuallisieren default_config
cd web/modules/custom/default_config
git pull
Nur EGW Module Kopieren: egw_default_config
drush en -y egw_default_config
alle
zeberliedvdefaults -> Löschen
Online
drush pmu -y me_redirect
Pre rsync
$live chmod -R 755 web/modules/custom/