ArgumentCountError: Too few arguments to function Drupal\hal\Normalizer\ContentEntityNormalizer::__construct(), 3 passed and exactly 5 expected I've replaced the deprecated functions with non-deprecated functions using drupal-check and PHPStorm. The site builds on Drupal 8.9.13. I update composer.json to 9.1.5 and run composer update. drush status output is the following.
    Drupal version   : 9.1.5
    Site URI         : http://default
    DB driver        : mysql
    DB hostname      : 127.0.0.1
    DB port          :
    DB username      : ----
    DB name          : ---- 
    Database         : Connected
    Drupal bootstrap : Successful
    Default theme    : - - - - 
    Admin theme      : seven
    PHP binary       : /usr/local/Cellar/php@7.3/7.3.27_1/bin/php
    PHP config       : /usr/local/etc/php/7.3/php.ini
    PHP OS           : Darwin
    Drush script     : /usr/local/bin/drush
    Drush version    : 10.4.0
    Drush temp       : /tmp
    Drush configs    : ---- 
    Install profile  : standard
    Drupal root      : ----
    Site path        : sites/default
    Files, Public    : sites/default/files
    Files, Private   : sites/default/files/private
    Files, Temp      : /tmp

When I run drush cr, it fails.

PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function Drupal\hal\Normalizer\ContentEntityNormalizer::__construct(), 3 passed in /web/core/lib/Drupal/Component/DependencyInjection/Container.php on line 257 and exactly 5 expected in /web/core/modules/hal/src/Normalizer/ContentEntityNormalizer.php:57
Stack trace:
#0 /web/core/lib/Drupal/Component/DependencyInjection/Container.php(257): Drupal\hal\Normalizer\ContentEntityNormalizer-&gt;__construct(Object(Drupal\hal\LinkManager\LinkManager), Object(Drupal\Core\Entity\EntityTypeManager), Object(Drupal\Core\Extension\ModuleHandler))
#1 /web/core/lib/Drupal/Component/DependencyInjection/Container.php(447): Drupal\Component\DependencyInjection\Container-&gt;createService(Array, 'private__...')
#2 /web/core/lib/Drupal/Component/DependencyInjection/Container.php(460): Drupal\Component\DependencyInjection\Container-&gt;resolve in /web/core/modules/hal/src/Normalizer/ContentEntityNormalizer.php on line 57
Fatal error: Uncaught ArgumentCountError: Too few arguments to function Drupal\hal\Normalizer\ContentEntityNormalizer::__construct(), 3 passed in /web/core/lib/Drupal/Component/DependencyInjection/Container.php on line 257 and exactly 5 expected in /web/core/modules/hal/src/Normalizer/ContentEntityNormalizer.php:57
Stack trace:
#0 /web/core/lib/Drupal/Component/DependencyInjection/Container.php(257): Drupal\hal\Normalizer\ContentEntityNormalizer-&gt;__construct(Object(Drupal\hal\LinkManager\LinkManager), Object(Drupal\Core\Entity\EntityTypeManager), Object(Drupal\Core\Extension\ModuleHandler))
#1 /web/core/lib/Drupal/Component/DependencyInjection/Container.php(447): Drupal\Component\DependencyInjection\Container-&gt;createService(Array, 'private__...')
#2 /web/core/lib/Drupal/Component/DependencyInjection/Container.php(460): Drupal\Component\DependencyInjection\Container-&gt;resolve in /web/core/modules/hal/src/Normalizer/ContentEntityNormalizer.php on line 57

Then I run drush updb (which is doomed). locale_update_9101 runs, but the Hal module post-update returns this error.

ArgumentCountError: Too few arguments to function Drupal\hal\Normalizer\ContentEntityNormalizer::__construct(), 3 passed and exactly 5 expected in Drupal\hal\Normalizer\ContentEntityNormalizer-&gt;__construct() (line 57 of /web/core/modules/hal/src/Normalizer/ContentEntityNormalizer.php)
#0 [internal function]: Drupal\hal\Normalizer\ContentEntityNormalizer-&gt;__construct(Object(Drupal\hal\LinkManager\LinkManager), Object(Drupal\Core\Entity\EntityTypeManager), Object(Drupal\Core\Extension\ModuleHandler))

The front page in the browser shows the same.
The container is not created. How do I debug this?
#0 in the stack trace contains Drupal\hal\LinkManager\LinkManager. That was ultimately the clue that the missing services were in our custom rest module. Whereas three services in our custom module was okay in Drupal 8. In Drupal 9, all five need to be included.
So yes, upgrading a Drupal 8 site to Drupal 9 works as advertised. It is, of course, still a lot of work. :-)