Cannot run composer update after going from 8.3 to 8.5 Upon trying to run composer update drupal/core --with-dependencies, I get this error:

➜  docroot git:(core-upgrade) ✗ composer update --with-dependencies        
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - The requested PHP extension ext-gd * is missing from your system. Install or enable PHP's gd extension.


I've never had this error before, why is ext-gd required at all?

Edit:

I am currently doing this:

phpbrew install 7.1.15 +default+iconv+gd

php -m did not show gd as an installed extension. I've been fine for months until now, so, I am not sure if there was some change between 8.3 to 8.5 or possibly Symfony packages that suddenly requires this.

Edit 2: 

This looks like it is also related to updating Homebrew/Xcode, as I had to take these additional steps in order to build a new version of PHP:

https://github.com/Homebrew/homebrew-php/issues/4590#issuecomment-346977512

Still does not explain why I suddenly need the gd extension to install or update a module with Composer for Drupal.
As of 8.5 core now explicitly requires several PHP extensions in composer.json, including gd:

...
"require": {
  "ext-date": "*",
  "ext-dom": "*",
  "ext-filter": "*",
  "ext-gd": "*",
  ...


The requirements match the required extension list in system_requirements, which would theoretically have to have been met for the original installation, and they were the same all the way back to 8.0.x, so it seems likely you did have gd installed when Drupal was installed. 

Without gd installed you should also see an error message in the status report telling you it's missing; if you don't see that error, perhaps you have a different php.ini for FPM and CLI, and gd is only enabled for FPM, so it works in web but not the command line.

The relevant issue on drupal.org is here for reference.