Drupal 10 升級 Drupal 11筆記
升級之前務必備份!非常重要唷!
最近把手上幾個站升到Drupal 11,做法大致下如下列筆記
執行 composer why-not drupal/core 11.1.0
(11.10再根據目前最新的版本做調整)
會列下如下方的內容
composer why-not drupal/core 11.1.0
drupal/blazy 2.27.0 requires drupal/core (^8.8 || ^9 || ^10)
drupal/bueditor 3.0.0 requires drupal/core (^8.8 || ^9 || ^10)
drupal/classy 1.0.2 requires drupal/core (^9 || ^10)
drupal/core-recommended 10.4.0 requires drupal/core (10.4.0)
drupal/flexible_views 2.1.1 requires drupal/core (^9.2 || ^10)
drupal/footable 2.x-dev requires drupal/core (^9 || ^10)
drupal/core 11.1.0 requires symfony/console (^7.2)
drupal/recommended-project - does not require symfony/console (but v6.4.15 is installed)
drupal/core 11.1.0 requires symfony/dependency-injection (^7.2)
drupal/recommended-project - does not require symfony/dependency-injection (but v6.4.16 is installed)
drupal/core 11.1.0 requires symfony/event-dispatcher (^7.2)
drupal/recommended-project - does not require symfony/event-dispatcher (but v6.4.13 is installed)
drupal/core 11.1.0 requires symfony/filesystem (^7.2)
drupal/recommended-project - does not require symfony/filesystem (but v6.4.13 is installed)
drupal/core 11.1.0 requires symfony/finder (^7.2)
drupal/recommended-project - does not require symfony/finder (but v6.4.13 is installed)
drupal/core 11.1.0 requires symfony/http-foundation (^7.2)
drupal/recommended-project - does not require symfony/http-foundation (but v6.4.16 is installed)
drupal/core 11.1.0 requires symfony/http-kernel (^7.2)
drupal/recommended-project - does not require symfony/http-kernel (but v6.4.16 is installed)
drupal/core 11.1.0 requires symfony/mailer (^7.2)
drupal/recommended-project - does not require symfony/mailer (but v6.4.13 is installed)
drupal/core 11.1.0 requires symfony/mime (^7.2)
drupal/recommended-project - does not require symfony/mime (but v6.4.13 is installed)
drupal/core 11.1.0 requires symfony/routing (^7.2)
drupal/recommended-project - does not require symfony/routing (but v6.4.16 is installed)
drupal/core 11.1.0 requires symfony/serializer (^7.2)
drupal/recommended-project - does not require symfony/serializer (but v6.4.15 is installed)
drupal/core 11.1.0 requires symfony/validator (^7.2)
drupal/recommended-project - does not require symfony/validator (but v6.4.16 is installed)
drupal/core 11.1.0 requires symfony/process (^7.2)
drupal/recommended-project - does not require symfony/process (but v6.4.15 is installed)
drupal/core 11.1.0 requires symfony/yaml (^7.2)
drupal/recommended-project - does not require symfony/yaml (but v6.4.13 is installed)
drupal/core 11.1.0 requires doctrine/annotations (^2.0)
drupal/recommended-project - does not require doctrine/annotations (but 1.14.4 is installed)
drupal/core 11.1.0 requires symfony/psr-http-message-bridge (^7.2)
drupal/recommended-project - does not require symfony/psr-http-message-bridge (but v6.4.13 is installed)
Not finding what you were looking for? Try calling `composer update "drupal/core:11.1.0" --dry-run` to get another view on the problem.
要設法解決處理沒支援的模組
drupal/blazy 2.27.0 requires drupal/core (^8.8 || ^9 || ^10)
drupal/bueditor 3.0.0 requires drupal/core (^8.8 || ^9 || ^10)
drupal/classy 1.0.2 requires drupal/core (^9 || ^10)
drupal/flexible_views 2.1.1 requires drupal/core (^9.2 || ^10)
drupal/footable 2.x-dev requires drupal/core (^9 || ^10)
處理的方向就是如果沒必要使用,就移除不用,原則上能一路升上去的模組,多半是較熱門使用的模組或開發者較積極維護。當然你如果有解決程式的能力,也可以自行修改
當所有模組的處理後,如果仍無法升級,可以先檢查 composer.json 的內容是否有被鎖住
"^10.0" 表示可以升級,"10.0" 表示鎖在10.0,基本上有"^"即可
然後把 composer.lock vendo 刪掉,再執行 composer install, drush updatedb, drush cr
順利的話就會升級成功
最後再次提醒,升級之前務必備份!非常重要唷!
留言