Updatenotizen Drupal 8 auf Drupal 9

Sat, 29/05/2021 - 23:42
Body

Private Updatenotizen Drupal 8 auf Drupal 9

https://www.drupal.org/docs/updating-drupal/updating-drupal-core-via-composer

Drupal 8 läuft irgendwie nicht auf php 8? Neun aber, ich muss aber von 8 nach 9 ....

Php ist nunmal aktuell und ich hab null bock jetzt hier mit dockerkram oder vms anzufangen. Viel zu viel Aufwand mal wieder.

 

 

 

1) Problem 1

Lokal klappts natürlich direkt nicht weil ich php 8 drauf habe. Here we go, i love it always

composer update drupal/core "drupal/core-*" --with-all-dependencies
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

 Problem 1
   - Root composer.json requires composer/installers ^1.2 -> satisfiable by composer/installers[v1.7.0].
   - composer/installers v1.7.0 requires composer-plugin-api ^1.0 -> found composer-plugin-api[2.0.0] but it does not match the constraint.
 Problem 2
   - league/container 2.4.1 requires php ^5.4.0 || ^7.0 -> your php version (8.0.6) does not satisfy that requirement.
   - drush/drush 10.3.6 requires league/container ~2 -> satisfiable by league/container[2.4.1].
   - drush/drush is locked to version 10.3.6 and an update of this package was not requested.
 

 

2) Idee 1: Platform requests ignorieren EINS ZWEI RISIKO!!!

composer update drupal/core "drupal/core-*" --with-all-dependencies --ignore-platform-reqs

Result:

[RuntimeException]                                                                                                                                                                               
 Could not scan for classes inside "/srv/http/WORKSPACE_DRUPAL/EIGENE_PROJEKTE/PRODUCT_DISTRI_D9/vendor/drupal/devel/.spoons/ScriptHandler.php" which does not appear to be a file nor a folder

NOCHMAL AUSFÜHREN! WIR GEBEN NICHT AUF!

INSTALL BROKEN, DRUPAL Does not load YEA...

LOGS

Sat May 29 23:00:26.455726 2021] [php7:error] [pid 30069] [client 127.0.0.1:46684] PHP Fatal error:  Cannot redeclare config_get_config_directory() (previously declared in /srv/http/WORKSPACE_DRUPAL/EIGENE_PROJEKTE/PRODUCT_DISTRI_D9/web/core/includes/bootstrap.inc:214) in /srv/http/WORKSPACE_DRUPAL/EIGENE_PROJEKTE/PRODUCT_DISTRI_D9/vendor/drupal/core/includes/bootstrap.inc on line 214, referer: http://dev9.funkkopfhoerer-infos.de/users/marco
[Sat May 29 23:00:27.481331 2021] [php7:error] [pid 30067] [client 127.0.0.1:46686] PHP Fatal error:  Cannot redeclare config_get_config_directory() (previously declared in /srv/http/WORKSPACE_DRUPAL/EIGENE_PROJEKTE/PRODUCT_DISTRI_D9/web/core/includes/bootstrap.inc:214) in /srv/http/WORKSPACE_DRUPAL/EIGENE_PROJEKTE/PRODUCT_DISTRI_D9/vendor/drupal/core/includes/bootstrap.inc on line 214, referer: http://dev9.funkkopfhoerer-infos.de/users/marco
[Sat May 29 23:00:27.981060 2021] [php7:error] [pid 30068] [client 127.0.0.1:46688] PHP Fatal error:  Cannot redeclare config_get_config_directory() (previously declared in /srv/http/WORKSPACE_DRUPAL/EIGENE_PROJEKTE/PRODUCT_DISTRI_D9/web/core/includes/bootstrap.inc:214) in /srv/http/WORKSPACE_DRUPAL/EIGENE_PROJEKTE/PRODUCT_DISTRI_D9/vendor/drupal/core/includes/bootstrap.inc on line 214, referer: http://dev9.funkkopfhoerer-infos.de/users/marco
[Sat May 29 23:00:28.215196 2021] [php7:error] [pid 30078] [client 127.0.0.1:46690] PHP Fatal error:  Cannot redeclare config_get_config_directory() (previously declared in /srv/http/WORKSPACE_DRUPAL/EIGENE_PROJEKTE/PRODUCT_DISTRI_D9/web/core/includes/bootstrap.inc:214) in /srv/http/WORKSPACE_DRUPAL/EIGENE_PROJEKTE/PRODUCT_DISTRI_D9/vendor/drupal/core/includes/bootstrap.inc on line 214, referer: http://dev9.funkkopfhoerer-infos.de/users/marco
[Sat May 29 23:00:31.304529 2021] [php7:error] [pid 30071] [client 127.0.0.1:46692] PHP Fatal error:  Cannot redeclare config_get_config_directory() (previously declared in /srv/http/WORKSPACE_DRUPAL/EIGENE_PROJEKTE/PRODUCT_DISTRI_D9/web/core/includes/bootstrap.inc:214) in /srv/http/WORKSPACE_DRUPAL/EIGENE_PROJEKTE/PRODUCT_DISTRI_D9/vendor/drupal/core/includes/bootstrap.inc on line 214, referer: http://dev9.funkkopfhoerer-infos.de/users/marco
[Sat May 29 23:00:36.758058 2021] [php7:error] [pid 30070] [client 127.0.0.1:46694] PHP Fatal error:  Cannot redeclare config_get_config_directory() (previously declared in /srv/http/WORKSPACE_DRUPAL/EIGENE_PROJEKTE/PRODUCT_DISTRI_D9/web/core/includes/bootstrap.inc:214) in /srv/http/WORKSPACE_DRUPAL/EIGENE_PROJEKTE/PRODUCT_DISTRI_D9/vendor/drupal/core/includes/bootstrap.inc on line 214

 

SUPER....

 

3) Idee 2, direkt update von 8 auf 9 im Rambo-Style

https://www.drupal.org/docs/upgrading-drupal/upgrading-from-drupal-8-to-drupal-9-or-later

 

4) Kopiere original 1:1

weiter TODO

 

5) your php version (8.0.0) does not satisfy that requirement.

https://www.devopsschool.com/blog/composer-update-fails-with-composer-json-php-version-7-1-3/

composer install --ignore-platform-reqs

 

 

 

PHP Fatal error:  Declaration of Drupal\Core\Database\Statement::fetchAll($mode = null, $column_index = null, $constructor_arguments = null) must be compatible with PDOStatement::fetchAll(int $mode = PDO::FETCH_BOTH, mixed ...$args) in
/srv/http/WORKSPACE_DRUPAL/EIGENE_PROJEKTE/PRODUCT_DISTRI_D9/web/core/lib/Drupal/Core/Database/Statement.php on line 169

Liegt an php 8 der cli-..... also php7 nutzen "php7 /srv/http/WORKSPACE_DRUPAL/EIGENE_PROJEKTE/PRODUCT_DISTRI_D9/vendor/drush/drush/drush
"

 

6) So Update D8 -> D9

  1. Erstmal alte module, nicht genutzte entfernen!!
  2. Update je nachdem V1 nach V2 module etc.
  3. prüfe das per Upgrade Modul

 

Entferne alten Kram!  Als php 7 laufenm lassen, lokal rennt 7 und 8!!

  • /usr/bin/php7 /srv/http/WORKSPACE_DRUPAL/EIGENE_PROJEKTE/PRODUCT_DISTRI_D9/vendor/drush/drush/drush pm:uninstall at_theme_generator && composer remove drupal/at_theme_generator --ignore-platform-reqs
  • /usr/bin/php7 /srv/http/WORKSPACE_DRUPAL/EIGENE_PROJEKTE/PRODUCT_DISTRI_D9/vendor/drush/drush/drush pm:uninstall at_tools
    && composer remove drupal/at_tools --ignore-platform-reqs
  • /usr/bin/php7 /srv/http/WORKSPACE_DRUPAL/EIGENE_PROJEKTE/PRODUCT_DISTRI_D9/vendor/drush/drush/drush pm:uninstall devel
    && composer remove drupal/devel --ignore-platform-reqs
  • /usr/bin/php7 /srv/http/WORKSPACE_DRUPAL/EIGENE_PROJEKTE/PRODUCT_DISTRI_D9/vendor/drush/drush/drush pm:uninstall embed_view_block && composer remove drupal/embed_view_block --ignore-platform-reqs
  • /usr/bin/php7 /srv/http/WORKSPACE_DRUPAL/EIGENE_PROJEKTE/PRODUCT_DISTRI_D9/vendor/drush/drush/drush pm:uninstall examples && composer remove drupal/examples --ignore-platform-reqs
  • /usr/bin/php7 /srv/http/WORKSPACE_DRUPAL/EIGENE_PROJEKTE/PRODUCT_DISTRI_D9/vendor/drush/drush/drush pm:uninstall migrate_file_to_media && composer remove drupal/migrate_file_to_media --ignore-platform-reqs
  • /usr/bin/php7 /srv/http/WORKSPACE_DRUPAL/EIGENE_PROJEKTE/PRODUCT_DISTRI_D9/vendor/drush/drush/drush pm:uninstall migrate_file && composer remove drupal/migrate_file --ignore-platform-reqs
  • /usr/bin/php7 /srv/http/WORKSPACE_DRUPAL/EIGENE_PROJEKTE/PRODUCT_DISTRI_D9/vendor/drush/drush/drush pm:uninstall media_entity_browser && composer remove drupal/media_entity_browser --ignore-platform-reqs
  • /usr/bin/php7 /srv/http/WORKSPACE_DRUPAL/EIGENE_PROJEKTE/PRODUCT_DISTRI_D9/vendor/drush/drush/drush pm:uninstall media_entity && composer remove drupal/media_entity --ignore-platform-reqs
  • /usr/bin/php7 /srv/http/WORKSPACE_DRUPAL/EIGENE_PROJEKTE/PRODUCT_DISTRI_D9/vendor/drush/drush/drush pm:uninstall site_map && composer remove drupal/site_map --ignore-platform-reqs
  • /usr/bin/php7 /srv/http/WORKSPACE_DRUPAL/EIGENE_PROJEKTE/PRODUCT_DISTRI_D9/vendor/drush/drush/drush pm:uninstall views_responsive_grid && composer remove drupal/views_responsive_grid --ignore-platform-reqs

 

Info

Search Exclude wird nur von BTL genutzt. Die beta 2 ist D9 kompatibel

  • composer require drupal/search_exclude:2.0.0-beta2 --ignore-platform-reqs

Prüfe ob das in D9 läuft! Auf BTL

 

Update gewisse Module auf neue version oder betas für D9 Kompatibilität

  • composer require drupal/advanced_text_formatter:2.0.0 --ignore-platform-reqs
  • composer require drupal/linkit:6.0.0-beta2 --ignore-platform-reqs
  • composer require drupal/entity --ignore-platform-reqs
  • composer require drupal/existing_values_autocomplete_widget:2.0.0-alpha2 --ignore-platform-reqs
  • composer require drupal/typed_data:1.x-dev --ignore-platform-reqs
  • composer require drupal/rules:3.0-alpha6 --ignore-platform-reqs
  • composer require drupal/imageapi_optimize:4.0.0-beta1 --ignore-platform-reqs
  • composer require drupal/recaptcha:3.0 --ignore-platform-reqs
  • composer require drupal/webform:6.0.3 --ignore-platform-reqs
  • composer require drupal/insert_view:2.0.0 --ignore-platform-reqs
  • composer require drupal/search404:2.0.0 --ignore-platform-reqs
  • composer require drupal/search_autocomplete:2.0.1 --ignore-platform-reqs
  • composer require drupal/taxonomy_manager:2.0.4 --ignore-platform-reqs
  • composer require drupal/better_exposed_filters:5.0-beta1 --ignore-platform-reqs
  • composer require drupal/plupload:2.0.0-beta1 --ignore-platform-reqs
  • composer require drupal/computed_field:3.0.0-alpha2 --ignore-platform-reqs
  • composer require drupal/imageapi_optimize_resmushit:2.0.0-beta1 --ignore-platform-reqs
  • composer require drupal/photoswipe:3.0.0-alpha0 --ignore-platform-reqs
  • composer require drupal/taxonomy_menu:3.x-dev --ignore-platform-reqs
  • composer require drupal/sitemap:2.0-beta2  --ignore-platform-reqs
  •  

 

WICHTIG: Linkit, Rules etc.!!! braucht die entity api contrib danach muss der cache neu erzeugt werden

  • /usr/bin/php7 /srv/http/WORKSPACE_DRUPAL/EIGENE_PROJEKTE/PRODUCT_DISTRI_D9/vendor/drush/drush/drush cr
     

WICHTIG: site_map wurde verschoben in sitemap also neuinstall. Link bleibt aber gleich /sitemap

 

Wird views_responsive_grid irgendwoe genutzt??? Weil das muss weg das modul

 

Müssen wir durch die ganzen speziellen Versions requirements das später wieder in der json ändern für zukünftige Updates?

 

 

Back to top