geerlingguy / jeffgeerling-com

Drupal Codebase for JeffGeerling.com
https://www.jeffgeerling.com
GNU General Public License v2.0
41 stars 2 forks source link

Upgrade to Drupal 9 - Drupal 8 EOL November 2, 2021 #135

Closed geerlingguy closed 2 years ago

geerlingguy commented 3 years ago

Welp, after a nice long run (6 years?) on D7, it looks like it'll just be one year on Drupal 8 before I need to upgrade this site to Drupal 9.

See: Drupal 8 end-of-life on November 2, 2021 (four months from now) - PSA-2021-2021-06-29.

Last time I checked (late last year) there were still one or two modules that didn't have full Drupal 9-compatible releases... so I need to try to figure out how to drop that functionality or do something else. The main things I need are all in core now, so hopefully the upgrade will be easy enough.

Current checklist:

geerlingguy commented 3 years ago

Quick module inventory:

Module Status
Admin Toolbar 3.0.1 available
Anti Spam by CleanTalk Compatible
Chaos Tools Suite Probably compatible
Config Filter Compatible
Config Split Compatible
Facets Compatible
Honeypot Compatible
Insert Compatible (though this module's maintenance has been minimal)
Markdown See Drupal 9 support issue
Pathauto Compatible (requires CTools)
Redirect Compatible
Search API Compatible
Search API Solr Compatible
Simple Mail Drupal 9 Comptability patch Compatible
Simple XML Sitemap Compatible
Token Compatible
Gin Admin Theme Compatible
geerlingguy commented 2 years ago

Annoyingly Markdown and Simple Mail are still not released as compatible. Grr.

geerlingguy commented 2 years ago

I just upgraded everything else to be somewhat D9 compatible. Still have to deal with Simple Mail and Markdown.

geerlingguy commented 2 years ago

Simple Mail is actually D9 compatible.

geerlingguy commented 2 years ago

Someday, someday...

geerlingguy commented 2 years ago

Okay, gonna try this: https://www.drupal.org/docs/upgrading-drupal/upgrading-from-drupal-8-to-drupal-9-or-later

geerlingguy commented 2 years ago

Of course

$ composer update
...
    - Root composer.json requires drupal/markdown ^1.3 -> satisfiable by drupal/markdown[1.3.0, 1.x-dev].
    - drupal/markdown[1.3.0, ..., 1.x-dev] require drupal/core ~8.0 -> satisfiable by drupal/core[8.0.0-beta6, ..., 8.9.x-dev].

(And a bunch of other messages but I think markdown is the big one.)

geerlingguy commented 2 years ago
$ composer require 'drupal/markdown:^3.0@RC' --no-update

$ composer require 'drupal/markdown:^3.0@RC' --no-update
./composer.json has been updated

$ composer update
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - drupal/core-recommended 9.2.0-alpha1 requires symfony/yaml v4.4.21 -> satisfiable by symfony/yaml[v4.4.21].
    - Conclusion: don't install symfony/yaml v4.4.21 (conflict analysis result)
    - drupal/core-recommended 9.2.0-beta1 requires symfony/yaml v4.4.22 -> satisfiable by symfony/yaml[v4.4.22].
    - Conclusion: don't install symfony/yaml v4.4.22 (conflict analysis result)
    - drupal/core-recommended[9.2.0-beta2, ..., 9.2.0-beta3] require symfony/yaml v4.4.24 -> satisfiable by symfony/yaml[v4.4.24].
    - Conclusion: don't install symfony/yaml v4.4.24 (conflict analysis result)
    - drupal/core-recommended[9.3.0-alpha1, ..., 9.3.0-beta2] require symfony/yaml v4.4.29 -> satisfiable by symfony/yaml[v4.4.29].
    - Conclusion: don't install symfony/yaml v4.4.29 (conflict analysis result)
    - drupal/core-recommended[9.0.0-beta3, ..., 9.0.0-rc1] require symfony/yaml v4.4.8 -> satisfiable by symfony/yaml[v4.4.8].
    - Conclusion: don't install symfony/yaml v4.4.8 (conflict analysis result)
    - drupal/core-recommended[9.0.0, ..., 9.0.12] require symfony/yaml v4.4.9 -> satisfiable by symfony/yaml[v4.4.9].
    - Conclusion: don't install symfony/yaml v4.4.9 (conflict analysis result)
    - drupal/core-recommended[9.1.0-beta1, ..., 9.1.7] require symfony/yaml v4.4.16 -> satisfiable by symfony/yaml[v4.4.16].
    - Conclusion: don't install symfony/yaml v4.4.16 (conflict analysis result)
    - drupal/core-recommended[9.0.13, ..., 9.1.x-dev] require symfony/yaml v4.4.19 -> satisfiable by symfony/yaml[v4.4.19].
    - Conclusion: don't install symfony/yaml v4.4.19 (conflict analysis result)
    - drupal/core-recommended[9.2.0-rc1, ..., 9.2.x-dev] require symfony/yaml v4.4.25 -> satisfiable by symfony/yaml[v4.4.25].
    - Conclusion: don't install symfony/yaml v4.4.25 (conflict analysis result)
    - drupal/core-recommended[9.3.0-beta3, ..., 9.4.x-dev] require symfony/yaml v4.4.34 -> satisfiable by symfony/yaml[v4.4.34].
    - Conclusion: don't install symfony/yaml v4.4.34 (conflict analysis result)
    - drupal/core-recommended 9.0.0-alpha1 requires composer/installers v1.7.0 -> satisfiable by composer/installers[v1.7.0].
    - drupal/core-recommended[9.0.0-alpha2, ..., 9.0.0-beta2] require composer/installers v1.8.0 -> satisfiable by composer/installers[v1.8.0].
    - drush/drush 9.0.0-beta1 requires consolidation/annotated-command dev-master -> found consolidation/annotated-command[dev-discovery-with-composer-managed, ..., dev-php-74, 0.1.0, ..., 0.10.0, 1.0.0-beta1, ..., 1.x-dev, 2.0.0-beta1, ..., 2.x-dev, 4.0.0, ..., 4.x-dev, 5.x-dev (alias of dev-main)] but it does not match the constraint. Perhaps dev-master was renamed to dev-main?
    - drush/drush 9.0.0-beta5 requires consolidation/annotated-command dev-master as 2.7.0 -> found consolidation/annotated-command[dev-discovery-with-composer-managed, ..., dev-php-74, 0.1.0, ..., 0.10.0, 1.0.0-beta1, ..., 1.x-dev, 2.0.0-beta1, ..., 2.x-dev, 4.0.0, ..., 4.x-dev, 5.x-dev (alias of dev-main)] but it does not match the constraint. Perhaps dev-master was renamed to dev-main?
    - composer/installers[v1.2.0, ..., v1.8.0] require composer-plugin-api ^1.0 -> found composer-plugin-api[2.2.0] but it does not match the constraint.
    - drush/drush[9.5.0, ..., 9.x-dev] require symfony/yaml ^3.4 -> satisfiable by symfony/yaml[v3.4.0-BETA1, ..., 3.4.x-dev].
    - drush/drush[9.0.0-beta2, ..., 9.4.0] require symfony/yaml ~2.3|^3 -> satisfiable by symfony/yaml[v2.3.0, ..., 2.8.x-dev, v3.0.0-BETA1, ..., 3.4.x-dev].
    - drush/drush 9.0.0-alpha1 requires symfony/yaml ~2.3|~3.0 -> satisfiable by symfony/yaml[v2.3.0, ..., 2.8.x-dev, v3.0.0-BETA1, ..., 3.4.x-dev].
    - You can only install one version of a package, so only one of these can be installed: symfony/yaml[2.0.4, ..., 2.8.x-dev, v3.0.0-BETA1, ..., 3.4.x-dev, v4.0.0-BETA1, ..., 4.4.x-dev, v5.0.0-BETA1, ..., 5.4.x-dev, v6.0.0-BETA1, ..., 6.1.x-dev].
    - drupal/core-recommended 9.1.0-alpha1 requires symfony/yaml v4.4.15 -> satisfiable by symfony/yaml[v4.4.15].
    - Root composer.json requires drupal/core-recommended ^9 -> satisfiable by drupal/core-recommended[9.0.0-alpha1, ..., 9.4.x-dev].
    - Root composer.json requires drush/drush ^9.0 -> satisfiable by drush/drush[9.0.0-alpha1, ..., 9.x-dev].

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
geerlingguy commented 2 years ago
$ composer require 'drush/drush:^11.0@RC' --no-update
./composer.json has been updated

Loading composer repositories with package information
Updating dependencies
Lock file operations: 15 installs, 73 updates, 10 removals
...
Generating autoload files
56 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
PHP CodeSniffer Config installed_paths set to ../../drupal/coder/coder_sniffer,../../sirbrillig/phpcs-variable-analysis
Scaffolding files for drupal/core:
  - Skip [web-root]/.htaccess: overridden in drupal/recommended-project
  - Copy [web-root]/INSTALL.txt from assets/scaffold/files/drupal.INSTALL.txt
  - Copy [web-root]/README.md from assets/scaffold/files/drupal.README.md
  - Copy [web-root]/robots.txt from assets/scaffold/files/robots.txt
  - Copy [web-root]/update.php from assets/scaffold/files/update.php
  - Copy [web-root]/web.config from assets/scaffold/files/web.config
  - Copy [web-root]/sites/example.settings.local.php from assets/scaffold/files/example.settings.local.php
  - Copy [web-root]/sites/example.sites.php from assets/scaffold/files/example.sites.php
  - Copy [web-root]/sites/default/default.services.yml from assets/scaffold/files/default.services.yml
  - Copy [web-root]/sites/default/default.settings.php from assets/scaffold/files/default.settings.php

So... looks like that may have worked. We shall see.

geerlingguy commented 2 years ago
$ docker-compose exec drupal bash -c 'drush updb -y'
The Drush launcher could not find a Drupal site to operate on. Please do *one* of the following:
  - Navigate to any where within your Drupal project and try again.
  - Add --root=/path/to/drupal so Drush knows where your site is located.

root@f05f30b6efc4:/var/www/html# drush --version
Drush Launcher Version: 0.9.1
The Drush launcher could not find a Drupal site to operate on. Please do *one* of the following:
  - Navigate to any where within your Drupal project and try again.
  - Add --root=/path/to/drupal so Drush knows where your site is located.

That's not promising...

Maybe running into https://github.com/drush-ops/drush-launcher/issues/96 ?

Maybe not...

root@f05f30b6efc4:/var/www/html# php -v
PHP 7.4.18 (cli) (built: May  3 2021 11:59:44) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.18, Copyright (c), by Zend Technologies
geerlingguy commented 2 years ago

Tried downgrading drush:

$ composer require 'drush/drush:^10' --no-update                              
./composer.json has been updated

$ composer update
Loading composer repositories with package information
Updating dependencies
Lock file operations: 0 installs, 4 updates, 2 removals
  - Removing symfony/polyfill-intl-grapheme (v1.24.0)
  - Removing symfony/string (v5.4.2)
  - Downgrading chi-teck/drupal-code-generator (2.3.1 => 1.33.1)
  - Downgrading drush/drush (11.0.0-rc7 => 10.6.2)
  - Downgrading psy/psysh (v0.11.1 => v0.10.12)
  - Downgrading symfony/filesystem (v5.4.0 => v4.4.27)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 0 installs, 4 updates, 2 removals
  - Downloading psy/psysh (v0.10.12)
  - Downloading chi-teck/drupal-code-generator (1.33.1)
  - Downloading drush/drush (10.6.2)
  - Removing symfony/string (v5.4.2)
  - Removing symfony/polyfill-intl-grapheme (v1.24.0)
  - Downgrading symfony/filesystem (v5.4.0 => v4.4.27): Extracting archive
  - Downgrading psy/psysh (v0.11.1 => v0.10.12): Extracting archive
  - Downgrading chi-teck/drupal-code-generator (2.3.1 => 1.33.1): Extracting archive
  - Downgrading drush/drush (11.0.0-rc7 => 10.6.2): Extracting archive
Package doctrine/reflection is abandoned, you should avoid using it. Use roave/better-reflection instead.
Package webmozart/path-util is abandoned, you should avoid using it. Use symfony/filesystem instead.
Generating autoload files
54 packages you are using are looking for funding.
Use the `composer fund` command to find out more!

$ docker-compose exec drupal bash -c 'drush updb -y'                                  

In YamlSymfony.php line 40:

  Duplicate key "parameters" detected at line 11.  

In Parser.php line 345:

  Duplicate key "parameters" detected at line 11.  
geerlingguy commented 2 years ago

Debugging:

$ docker-compose exec drupal bash -c 'drush -vvv updb -y'

Box Requirements Checker
========================

> Using PHP 7.4.18
> PHP is using the following php.ini file:
  /etc/php/7.4/cli/php.ini

> Checking Box requirements:
  ✔ The package "composer/xdebug-handler" requires the version "^5.3.2 || ^7.0 || ^8.0" or greater.
  ✔ The package "laravel-zero/phar-updater" requires the version "^7.3|^8.0" or greater.
  ✔ The package "psr/log" requires the version ">=5.3.0" or greater.
  ✔ The package "symfony/polyfill-ctype" requires the version ">=7.1" or greater.
  ✔ The package "webmozart/assert" requires the version "^7.2 || ^8.0" or greater.
  ✔ The package "webmozart/path-util" requires the version ">=5.3.3" or greater.
  ✔ The package "webflo/drupal-finder" requires the extension "json".

 [OK] Your system is ready to run the application.                                                                      

 [preflight] Config paths: /var/www/html/vendor/drush/drush/drush.yml
 [preflight] Alias paths: /var/www/html/web/drush/sites,/var/www/html/drush/sites
 [preflight] Commandfile search paths: /var/www/html/vendor/drush/drush/src
 [debug] Starting bootstrap to full [0.79 sec, 9.22 MB]
 [debug] Drush bootstrap phase 5 [0.79 sec, 9.22 MB]
 [debug] Try to validate bootstrap phase 5 [0.79 sec, 9.22 MB]
 [debug] Try to validate bootstrap phase 5 [0.79 sec, 9.22 MB]
 [debug] Try to bootstrap at phase 5 [0.79 sec, 9.22 MB]
 [debug] Drush bootstrap phase: bootstrapDrupalRoot() [0.79 sec, 9.22 MB]
 [debug] Change working directory to /var/www/html/web [0.79 sec, 9.22 MB]
 [debug] Initialized Drupal 9.3.2 root directory at /var/www/html/web [0.79 sec, 9.22 MB]
 [debug] Try to validate bootstrap phase 5 [0.79 sec, 9.22 MB]
 [debug] Try to bootstrap at phase 5 [0.79 sec, 9.29 MB]
 [debug] Drush bootstrap phase: bootstrapDrupalSite() [0.79 sec, 9.29 MB]
 [debug] Initialized Drupal site default at sites/default [0.8 sec, 9.46 MB]
 [debug] Try to validate bootstrap phase 5 [0.8 sec, 9.46 MB]
 [debug] Try to bootstrap at phase 5 [0.8 sec, 9.46 MB]
 [debug] Drush bootstrap phase: bootstrapDrupalConfiguration() [0.81 sec, 9.46 MB]
 [debug] Add service modifier [0.83 sec, 9.67 MB]
 [debug] Try to validate bootstrap phase 5 [0.83 sec, 9.67 MB]
 [debug] Try to bootstrap at phase 5 [0.85 sec, 10.15 MB]
 [debug] Drush bootstrap phase: bootstrapDrupalDatabase() [0.85 sec, 10.15 MB]
 [debug] Successfully connected to the Drupal database. [0.85 sec, 10.15 MB]
 [debug] Try to validate bootstrap phase 5 [0.85 sec, 10.15 MB]
 [debug] Try to bootstrap at phase 5 [0.85 sec, 10.15 MB]
 [debug] Drush bootstrap phase: bootstrapDrupalFull() [0.85 sec, 10.15 MB]
 [debug] Start bootstrap of the Drupal Kernel. [0.85 sec, 10.15 MB]
 [debug] Found drush.services.yml for config_split Drush commands [1.43 sec, 12.07 MB]
 [debug] Found drush.services.yml for devel Drush commands [1.44 sec, 12.07 MB]
 [debug] Found drush.services.yml for markdown Drush commands [1.46 sec, 12.07 MB]
 [debug] Found drush.services.yml for search_api Drush commands [1.48 sec, 12.07 MB]
 [debug] Found drush.services.yml for search_api_solr Drush commands [1.48 sec, 12.07 MB]
 [debug] Found drush.services.yml for simple_sitemap Drush commands [1.49 sec, 12.07 MB]
 [debug] Found drush.services.yml for token Drush commands [1.49 sec, 12.07 MB]
 [debug] Found drush.services.yml for pathauto Drush commands [1.5 sec, 12.07 MB]
 [debug] Get container builder [1.51 sec, 12.09 MB]
 [debug] Service modifier alter. [1.52 sec, 12.18 MB]

In YamlSymfony.php line 40:

  [Drupal\Component\Serialization\Exception\InvalidDataTypeException]  
  Duplicate key "parameters" detected at line 11.                      

Exception trace:
  at /var/www/html/web/core/lib/Drupal/Component/Serialization/YamlSymfony.php:40
 Drupal\Component\Serialization\YamlSymfony::decode() at /var/www/html/web/core/lib/Drupal/Component/Serialization/Yaml.php:35
 Drupal\Component\Serialization\Yaml::decode() at /var/www/html/web/core/lib/Drupal/Core/DependencyInjection/YamlFileLoader.php:346
 Drupal\Core\DependencyInjection\YamlFileLoader->loadFile() at /var/www/html/web/core/lib/Drupal/Core/DependencyInjection/YamlFileLoader.php:65
 Drupal\Core\DependencyInjection\YamlFileLoader->load() at /var/www/html/web/core/lib/Drupal/Core/DrupalKernel.php:1271
 Drupal\Core\DrupalKernel->compileContainer() at /var/www/html/web/core/lib/Drupal/Core/DrupalKernel.php:900
 Drupal\Core\DrupalKernel->initializeContainer() at /var/www/html/web/core/lib/Drupal/Core/Update/UpdateKernel.php:42
 Drupal\Core\Update\UpdateKernel->initializeContainer() at /var/www/html/vendor/drush/drush/src/Drupal/DrupalKernelTrait.php:69
 Drush\Drupal\UpdateKernel->initializeContainer() at /var/www/html/web/core/lib/Drupal/Core/DrupalKernel.php:472
 Drupal\Core\DrupalKernel->boot() at /var/www/html/vendor/drush/drush/src/Boot/DrupalBoot8.php:241
 Drush\Boot\DrupalBoot8->bootstrapDrupalFull() at /var/www/html/vendor/drush/drush/src/Boot/BootstrapManager.php:293
 Drush\Boot\BootstrapManager->doBootstrap() at /var/www/html/vendor/drush/drush/src/Boot/BootstrapManager.php:447
 Drush\Boot\BootstrapManager->bootstrapToPhaseIndex() at /var/www/html/vendor/drush/drush/src/Boot/BootstrapManager.php:396
 Drush\Boot\BootstrapManager->bootstrapToPhase() at /var/www/html/vendor/drush/drush/src/Boot/BootstrapHook.php:28
 Drush\Boot\BootstrapHook->initialize() at /var/www/html/vendor/consolidation/annotated-command/src/Hooks/Dispatchers/InitializeHookDispatcher.php:44
 Consolidation\AnnotatedCommand\Hooks\Dispatchers\InitializeHookDispatcher->doInitializeHook() at /var/www/html/vendor/consolidation/annotated-command/src/Hooks/Dispatchers/InitializeHookDispatcher.php:36
 Consolidation\AnnotatedCommand\Hooks\Dispatchers\InitializeHookDispatcher->callInitializeHook() at /var/www/html/vendor/consolidation/annotated-command/src/Hooks/Dispatchers/InitializeHookDispatcher.php:29
 Consolidation\AnnotatedCommand\Hooks\Dispatchers\InitializeHookDispatcher->initialize() at /var/www/html/vendor/consolidation/annotated-command/src/CommandProcessor.php:145
 Consolidation\AnnotatedCommand\CommandProcessor->initializeHook() at /var/www/html/vendor/consolidation/annotated-command/src/AnnotatedCommand.php:335
 Consolidation\AnnotatedCommand\AnnotatedCommand->initialize() at /var/www/html/vendor/symfony/console/Command/Command.php:221
 Symfony\Component\Console\Command\Command->run() at /var/www/html/vendor/symfony/console/Application.php:1027
 Symfony\Component\Console\Application->doRunCommand() at /var/www/html/vendor/symfony/console/Application.php:273
 Symfony\Component\Console\Application->doRun() at /var/www/html/vendor/symfony/console/Application.php:149
 Symfony\Component\Console\Application->run() at /var/www/html/vendor/drush/drush/src/Runtime/Runtime.php:118
 Drush\Runtime\Runtime->doRun() at /var/www/html/vendor/drush/drush/src/Runtime/Runtime.php:48
 Drush\Runtime\Runtime->run() at /var/www/html/vendor/drush/drush/drush.php:72
 require() at /var/www/html/vendor/drush/drush/includes/preflight.inc:18
 drush_main() at phar:///usr/local/bin/drush/bin/drush.php:143
 require() at /usr/local/bin/drush:14

In Parser.php line 345:

  [Symfony\Component\Yaml\Exception\ParseException]  
  Duplicate key "parameters" detected at line 11.    

Exception trace:
  at /var/www/html/vendor/symfony/yaml/Parser.php:345
 Symfony\Component\Yaml\Parser->doParse() at /var/www/html/vendor/symfony/yaml/Parser.php:96
 Symfony\Component\Yaml\Parser->parse() at /var/www/html/web/core/lib/Drupal/Component/Serialization/YamlSymfony.php:37
 Drupal\Component\Serialization\YamlSymfony::decode() at /var/www/html/web/core/lib/Drupal/Component/Serialization/Yaml.php:35
 Drupal\Component\Serialization\Yaml::decode() at /var/www/html/web/core/lib/Drupal/Core/DependencyInjection/YamlFileLoader.php:346
 Drupal\Core\DependencyInjection\YamlFileLoader->loadFile() at /var/www/html/web/core/lib/Drupal/Core/DependencyInjection/YamlFileLoader.php:65
 Drupal\Core\DependencyInjection\YamlFileLoader->load() at /var/www/html/web/core/lib/Drupal/Core/DrupalKernel.php:1271
 Drupal\Core\DrupalKernel->compileContainer() at /var/www/html/web/core/lib/Drupal/Core/DrupalKernel.php:900
 Drupal\Core\DrupalKernel->initializeContainer() at /var/www/html/web/core/lib/Drupal/Core/Update/UpdateKernel.php:42
 Drupal\Core\Update\UpdateKernel->initializeContainer() at /var/www/html/vendor/drush/drush/src/Drupal/DrupalKernelTrait.php:69
 Drush\Drupal\UpdateKernel->initializeContainer() at /var/www/html/web/core/lib/Drupal/Core/DrupalKernel.php:472
 Drupal\Core\DrupalKernel->boot() at /var/www/html/vendor/drush/drush/src/Boot/DrupalBoot8.php:241
 Drush\Boot\DrupalBoot8->bootstrapDrupalFull() at /var/www/html/vendor/drush/drush/src/Boot/BootstrapManager.php:293
 Drush\Boot\BootstrapManager->doBootstrap() at /var/www/html/vendor/drush/drush/src/Boot/BootstrapManager.php:447
 Drush\Boot\BootstrapManager->bootstrapToPhaseIndex() at /var/www/html/vendor/drush/drush/src/Boot/BootstrapManager.php:396
 Drush\Boot\BootstrapManager->bootstrapToPhase() at /var/www/html/vendor/drush/drush/src/Boot/BootstrapHook.php:28
 Drush\Boot\BootstrapHook->initialize() at /var/www/html/vendor/consolidation/annotated-command/src/Hooks/Dispatchers/InitializeHookDispatcher.php:44
 Consolidation\AnnotatedCommand\Hooks\Dispatchers\InitializeHookDispatcher->doInitializeHook() at /var/www/html/vendor/consolidation/annotated-command/src/Hooks/Dispatchers/InitializeHookDispatcher.php:36
 Consolidation\AnnotatedCommand\Hooks\Dispatchers\InitializeHookDispatcher->callInitializeHook() at /var/www/html/vendor/consolidation/annotated-command/src/Hooks/Dispatchers/InitializeHookDispatcher.php:29
 Consolidation\AnnotatedCommand\Hooks\Dispatchers\InitializeHookDispatcher->initialize() at /var/www/html/vendor/consolidation/annotated-command/src/CommandProcessor.php:145
 Consolidation\AnnotatedCommand\CommandProcessor->initializeHook() at /var/www/html/vendor/consolidation/annotated-command/src/AnnotatedCommand.php:335
 Consolidation\AnnotatedCommand\AnnotatedCommand->initialize() at /var/www/html/vendor/symfony/console/Command/Command.php:221
 Symfony\Component\Console\Command\Command->run() at /var/www/html/vendor/symfony/console/Application.php:1027
 Symfony\Component\Console\Application->doRunCommand() at /var/www/html/vendor/symfony/console/Application.php:273
 Symfony\Component\Console\Application->doRun() at /var/www/html/vendor/symfony/console/Application.php:149
 Symfony\Component\Console\Application->run() at /var/www/html/vendor/drush/drush/src/Runtime/Runtime.php:118
 Drush\Runtime\Runtime->doRun() at /var/www/html/vendor/drush/drush/src/Runtime/Runtime.php:48
 Drush\Runtime\Runtime->run() at /var/www/html/vendor/drush/drush/drush.php:72
 require() at /var/www/html/vendor/drush/drush/includes/preflight.inc:18
 drush_main() at phar:///usr/local/bin/drush/bin/drush.php:143
 require() at /usr/local/bin/drush:14
geerlingguy commented 2 years ago

lol... so eventually I found in my own local sites/development.services.yml file, I have:

parameters:
  http.response.debug_cacheability_headers: true
services:
  cache.backend.null:
    class: Drupal\Core\Cache\NullBackendFactory

parameters:
  twig.config:
    debug: true
    auto_reload: true

And whaddya know; it's actually there! https://github.com/geerlingguy/jeffgeerling-com/blob/ab9351100cd6c329b44eaaf5d2b2c03f0744a7e0/web/sites/development.services.yml

So, yay, I guess. The annoying thing is this wasn't caught before—I guess it was just blindly accepting the 2nd one in the past.

geerlingguy commented 2 years ago

Okay, new problem:

 [error]   (Currently using Incompatible theme The following theme is installed, but it is incompatible with Drupal 9.3.2:
 * Jeff Geerling

Review the  suggestions for resolving this incompatibility [1] to repair your 
installation, and then re-run update.php.

[1] https://www.drupal.org/docs/8/update/troubleshooting-database-updates
) [18.11 sec, 61.77 MB] 

Looks like I need to bump the theme in some way to get it D9 compatible.

geerlingguy commented 2 years ago

A few other tidbits:

 [info] Executing: /usr/local/bin/drush updatedb:status --verbose --yes --no-entity-updates --strict=0 --uri=default --root=/var/www/html/web [18.16 sec, 62.18 MB]
 ----------------- ----------- --------------- ------------------------------------ 
  Module            Update ID   Type            Description                         
 ----------------- ----------- --------------- ------------------------------------ 
  search_api        8107        hook_update_n   8107 - Add a unique index to the    
                                                task entity type's storage.         
  search_api        8108        hook_update_n   8108 - Add configuration for boost  
                                                factors.                            
  search_api        8109        hook_update_n   8109 - Enable index entity          
                                                references option by default on     
                                                existing indexes.                   
  search_api_solr   8410        hook_update_n   8410 - Allow to turn off the        
                                                distrib parameter for Solr Cloud.   
  search_api_solr   8411        hook_update_n   8411 - Handle American and British  
                                                synonyms and Māori macrons.         
  search_api_solr   8412        hook_update_n   8412 - Add support for hostContext  
                                                parameter for Solr Cloud.           
  user              9301        hook_update_n   9301 - Change the users table to    
                                                use an serial uid field.            
  block             repla       post-update     Updates the node type visibility    
                    ce_no                       condition.                          
                    de_ty                                                           
                    pe_co                                                           
                    nditi                                                           
                    on                                                              
  file              add_t       post-update     Add txt to allowed extensions for   
                    xt_if                       all fields that allow uploads of    
                    _allo                       insecure files.                     
                    ws_in                                                           
                    secur                                                           
                    e_ext                                                           
                    ensio                                                           
                    ns                                                              
  markdown          8950        post-update     Update configuration (run config    
                                                export after).                      
  node              rebui       post-update     Rebuild the node revision routes.   
                    ld_no                                                           
                    de_re                                                           
                    visio                                                           
                    n_rou                                                           
                    tes                                                             
  search_api_solr   8320        post-update     Install new Search API Solr         
                                                Autocomplete.                       
  system            claro       post-update     Clear caches due to                 
                    _drop                       trustedCallbacks changing in        
                    butto                       ClaroPreRender.                     
                    n_var                                                           
                    iants                                                           
  system            delet       post-update     Remove obsolete system.authorize    
                    e_aut                       configuration.                      
                    horiz                                                           
                    e_set                                                           
                    tings                                                           
  system            delet       post-update     Remove obsolete system.rss          
                    e_rss                       configuration.                      
                    _sett                                                           
                    ings                                                            
  system            entit       post-update     Remove backwards-compatibility      
                    y_rev                       leftovers from entity type          
                    ision                       definitions.                        
                    _meta                                                           
                    data_                                                           
                    bc_cl                                                           
                    eanup                                                           
  system            remov       post-update     Drop the 'all' index on the         
                    e_key                       'key_value_expire' table.           
                    _valu                                                           
                    e_exp                                                           
                    ire_a                                                           
                    ll_in                                                           
                    dex                                                             
  system            schem       post-update     Update schema version to integers.  
                    a_ver                         @see                              
                    sion_                       https:www.drupal.orgprojectdrupali  
                    int                         ssues3143713                        
  system            servi       post-update     Add new security advisory           
                    ce_ad                       retrieval settings.                 
                    visor                                                           
                    y_set                                                           
                    tings                                                           
  system            sort_       post-update     Sort all configuration according    
                    all_c                       to its schema.                      
                    onfig                                                           
  system            unins       post-update     Uninstall Classy if it is no        
                    tall_                       longer needed.                      
                    class                                                           
                    y                                                               
  system            unins       post-update     Uninstall entity_reference.   @see  
                    tall_                       https:www.drupal.orgprojectdrupali  
                    entit                       ssues3111645                        
                    y_ref                                                           
                    erenc                                                           
                    e_mod                                                           
                    ule                                                             
  system            unins       post-update     Uninstall SimpleTest.   @see        
                    tall_                       https:www.drupal.orgprojectdrupali  
                    simpl                       ssues3110862                        
                    etest                                                           
  system            unins       post-update     Uninstall Stable if it is no        
                    tall_                       longer needed.   This needs to run  
                    stabl                       after                               
                    e                           system_post_update_uninstall_class  
                                                y(). This will be  the case since   
                                                getAvailableUpdateFunctions()       
                                                returns an alphabetically sorted    
                                                list of post_update hooks to be     
                                                run.   @see                         
                                                Drupal\Core\Update\UpdateRegistry:  
                                                :getAvailableUpdateFunctions()      
  taxonomy          clear       post-update     Clear the cache after deprecating   
                    _view                       Term views argument validator.      
                    s_arg                                                           
                    ument                                                           
                    _vali                                                           
                    dator                                                           
                    _plug                                                           
                    ins_c                                                           
                    ache                                                            
  user              updat       post-update     Calculate role dependencies and     
                    e_rol                       remove non-existent permissions.    
                    es                                                              
  views             confi       post-update     Clear errors caused by              
                    gurat                       relationships to configuration      
                    ion_e                       entities.                           
                    ntity                                                           
                    _rela                                                           
                    tions                                                           
                    hips                                                            
  views             remov       post-update     Clear caches due to removal of      
                    e_sor                       sorting for global custom text      
                    ting_                       field.                              
                    globa                                                           
                    l_tex                                                           
                    t_fie                                                           
                    ld                                                              
  views             renam       post-update     Rename the setting for showing the  
                    e_def                       default display to                  
                    ault_                       'default_display'.                  
                    displ                                                           
                    ay_se                                                           
                    tting                                                           
  views             sort_       post-update     Add the identifier option to all    
                    ident                       sort handler configurations.        
                    ifier                                                           
  views             title       post-update     Rebuild routes to fix view title    
                    _tran                       translations.                       
                    slati                                                           
                    ons                                                             
 ----------------- ----------- --------------- ------------------------------------ 

 // Do you wish to run the specified pending updates?: yes. 
...
[notice] Unable to update config for "markdown.settings", it must be updated manually or recreated from the UI. [14.44 sec, 75.13 MB]
[notice] Unable to update config for "filter.format.markdown", it must be updated manually or recreated from the UI. [14.44 sec, 75.14 MB]
[notice] Unable to update config for "filter.format.untouched", it must be updated manually or recreated from the UI. [14.44 sec, 75.15 MB]
[warning] No default markdown parser set, using first available installed parser "". [16.63 sec, 96.15 MB]
...
[warning] Message: A new Solr field type has been installed due to configuration changes. It is 
> advisable to download and deploy an updated config.zip to your Solr server.
geerlingguy commented 2 years ago

New issue:

Error: Call to undefined function entity_load_multiple_by_properties() in jeffgeerling_preprocess_node() (line 120 of /var/www/html/web/themes/jeffgeerling/jeffgeerling.theme)
geerlingguy commented 2 years ago

Fixed those two issues in a couple follow-up commits (also had to fix an entity_view() call), but now I'm hitting this trying to install a markdown parsing library:

$ composer require league/commonmark
Using version ^2.1 for league/commonmark
./composer.json has been updated
Running composer update league/commonmark
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - league/config[v1.1.1, ..., 1.2.x-dev] require dflydev/dot-access-data ^3.0.1 -> found dflydev/dot-access-data[dev-main, v3.0.1, 3.x-dev (alias of dev-main)] but the package is fixed to v1.1.0 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
    - league/commonmark[2.1.0, ..., 2.2.x-dev] require league/config ^1.1.1 -> satisfiable by league/config[v1.1.1, 1.1.x-dev, 1.2.x-dev].
    - Root composer.json requires league/commonmark ^2.1 -> satisfiable by league/commonmark[2.1.0, 2.1.1, 2.1.x-dev, 2.2.x-dev].

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
You can also try re-running composer require with an explicit version constraint, e.g. "composer require league/commonmark:*" to figure out if any version is installable, or "composer require league/commonmark:^2.1" if you know which you need.

Installation failed, reverting ./composer.json and ./composer.lock to their original content.
geerlingguy commented 2 years ago

Apparently that was this issue: league/commonmark:^2 incompatible with drush/drush.

Fixed with: composer require league/commonmark:^1.0, which installs... but now I'm getting The website encountered an unexpected error. Please try again later. on every page load.

Apparently the parameters key keeps getting duplicated in my development.services.yml because I have that set up in composer patches. D'oh!

geerlingguy commented 2 years ago

Trying composer require michelf/php-markdown also... and trying cache clears—it seems like there's no way for the Markdown module (at /admin/config/content/markdown) to recognize any of these parsers?

It keeps showing me Unavailable Parsers (7) and tells me to install them... but I have!

geerlingguy commented 2 years ago

Posted in issue Error "No default markdown parser set" even though /admin/config/content/markdown lists a default parser.

geerlingguy commented 2 years ago

I tried forcing it by visiting /admin/config/content/markdown/php-markdown/confirm-operation/default in the UI and clicking Confirm, and that set it as default, but it would still not show any available. And now if I try visiting a page that renders markdown, I get:

Error: Class '\Michelf\Markdown' not found in Drupal\markdown\Plugin\Markdown\PhpMarkdown\PhpMarkdown->getPhpMarkdown() (line 177 of /var/www/html/web/modules/contrib/markdown/src/Plugin/Markdown/PhpMarkdown/PhpMarkdown.php)
geerlingguy commented 2 years ago

Attempt to re-cycle Markdown completely:

  1. Remove Markdown from my existing Markdown input format (admin/config/content/formats)
  2. Uninstall Markdown: drush pmu markdown

...and I'm getting:

Error: APC must be enabled to use APCUIterator in APCUIterator->__construct() (line 270 of /var/www/html/web/core/lib/Drupal/Core/Cache/ApcuBackend.php).
 [warning] Drush command terminated abnormally.

Wheee!

geerlingguy commented 2 years ago

Okay, attempt number two:

  1. Remove Markdown from my existing Markdown input format (admin/config/content/formats)
  2. Uninstall Markdown in the UI (admin/modules/uninstall)
  3. Install Markdown in the UI (admin/modules)
  4. Visit Markdown admin page (/admin/config/content/markdown)

Aaaand... still no parsers available. What gives?!

geerlingguy commented 2 years ago

That's weird. I did a drush cr, then refreshed, and the markdown admin page was 'not found'. I went back to the modules UI page and Markdown showed as not enabled. I enabled it again.

Now commonmark is showing as the default but it's still not showing it as available (I do have it installed, confirmed via composer info league/commonmark at version 1.6.6.

geerlingguy commented 2 years ago

Well there we go... I asked in the Drupal Slack, and @bakulahluwalia mentioned maybe deleting the module folder and re-running composer install. I did that, and bingo! Some file must've been stuck in there with my composer shenanigans, and now it's all working.

geerlingguy commented 2 years ago

Testing an in-situ upgrade locally with my production database:

  1. Check out latest code in d9-upgrade branch
  2. Run composer install
  3. Run drush updb -y
  4. Run drush config:import
  5. Profit?
geerlingguy commented 2 years ago

Going to just stick with php-markdown library for the time being. It's what I had on the D8 version, so it'll be nice and consistent, at least.

geerlingguy commented 2 years ago

All right, ran through everything and it seems my site is still in one piece. Saving the database from just before the upgrade just in case.