I've been tasked to upgrade another inherited #drupal 9 site to 10, apply a some major updates to the existing theme, and stage it on #pantheon
As-is, none of the contrib modules had been defined in its #composer #json config, and it has quite a few complex added features and content types that may no longer be required. Let's see how this goes! 😎
for starters, it's #drupal 9.3, so I'll need to get it to 9.5 before upgrading to 10. That requires #composer v1, so I'll need to 'composer selfupdate --1' and then switch back to 2 after the update, IF that's successful
the initial strategy is uninstall and remove any #drupal modules that aren't required. Use #drush to update any that are required (since they aren't in composer.json), see if I can get it to 9.5 and then 10, then worry about wrangling and composerizing the existing contrib modules that are wandering around
Not a disaster, yet. Upped to #drupal 10.2.1. No #WSOD on the homepage or admin interface, though I haven't tested any other pages or views yet. I thought the #Radix based theme would be a showstopper, but that went ok. There was an odd theme function using hook_preprocess_image() that I had to disable, so now I'm just in the process of testing everything on the frontend :]
😬 fwiw, this #drupal 9.3 to10 upgrade was all done with a #WAMP dev environment in Windoze 11, #git for #windows with the little git Bash terminal, #vscode, manually installing the latest cacert.pem, and #dbeaver for creating backups at each major step. I'm OS ambidextrous, having been a datacenter tech and sysadmin, and always with a #linux vm running for various tools as well as #wsl. I just think most people believe this can't all be done on win.
ok.. on to testing and migrating this into #pantheon #drupal hosting 🙃
but first, I ran composer require 'drupal/[module]' for each #drupal contrib module that had been installed manually into the root module folder (years ago), first verifying the same version would be installed (into ./contrib), deleting the old version, running drush cr, and performing some basic tests. After doing that ten times, this site is now composerized :]
this process wound up working to get two other sites from #drupal 9.3 to 9.5 to 10.2.1.
I had to fix some issues with #Twig 'spaceless' being deprecated in the custom themes, and the profile_switcher saved me from remnants of Lightning 2.x beta something, though some time ago a lot of effort was put into disabling and removing all lightning workflow related features. 🦤 I think I like drupal again!
i would not put it past pantheon to make their KB articles for performing tasks you can also hire them to do for you a little opaque 🦤 also running into errors updating Terminus, just following their how-to, which I've never needed to use before. This might be a tomorrow thing.
@drupalthoughts whatever works for you is the right answer.
Mind you, other people might think I’m odd working on a D10 site’s code from my iPad.
@drupalthoughts Don't forget to diff each contrib module against a vanilla copy of the same version. It sounds like the site was built by incompetent boobs, and they probably hacked contrib (and maybe even core).
@ossobuffo thanks for the tips. i think this started as an early (even beta) D8 site, not even using composer for the initial install. The original devs were very astute D7 devs and built some great custom features and modules. I don't see anything going on here liked hacked core or modules :]
@ossobuffo just don't ask me about the site i built using #acquia lightning beta :]
@drupalthoughts I manually downloaded composer 1 and saved it to /usr/local/bin/composer1. Then you just have to remember to invoke composer1 instead of composer.