Problem/Motivation
Make sure Drupal keeps being compatible with PHP 8. Work with dependencies as needed. See #3086374: Make Drupal 8 & 9 compatible with PHP 7.4 for how we did it with PHP 7.4.
Proposed resolution
The following task list has been determined by testing on #3156595: Make Drupal 9 installable on PHP8.
PHP 8.0 is feature frozen and the first beta is out, see https://www.php.net/archive/2020.php#2020-08-06-3
Dependency updates to support PHP 8
- symfony/*, twig/twig, composer/* #3157296: Upgrade dependencies prior to 9.1.0
- behat/mink-selenium2-driver - https://github.com/minkphp/MinkSelenium2Driver/pull/320
- doctrine/reflection - https://github.com/doctrine/reflection/pull/43
- #3127141: Support PHPUnit 9 optionally in Drupal 9, while keeping support for ^8.4
Fixed
- symfony/*, twig/twig, composer/* #3156558: Upgrade dependencies prior to 9.1.0
- Update symfony contract php requirement - https://github.com/symfony/symfony/pull/37494
- phpspec/prophecy - https://github.com/phpspec/prophecy/pull/470
- phpdocumentor/reflection-docblock - https://github.com/phpDocumentor/ReflectionDocBlock/pull/240
Drupal issues that can be addressed in Drupal 8 & 9 today
- #3156542: \ReflectionParamter::getClass() is deprecated in PHP 8.0
- #3156878: \Drupal\Component\Datetime\DateTimePlus should pass correct parameter types to checkdate()
- #3156880: \Drupal\Core\Access\CsrfTokenGenerator::validate() - ensure $token is a string before calling hash_equals()
- #3156881: Various methods of \Drupal\Core\Database\StatementInterface have changed their signature for PHP 8
- #3156885: Change \Drupal\error_test\Controller\ErrorTestController::generateWarnings() to throw E_NOTICE error compatible with PHP 8
- #3156944: Support nullable typehints and return types in ProxyBuilder and as a result support PHP 8
- #3156879: \Drupal\Component\Utility\Bytes::toInt() - ensure $size is a number type
- #3156882: \Drupal\Core\Render\Element\StatusReport::preRenderGroupRequirements() and \Drupal\user\PermissionHandler::sortPermissions() sorts return bools
- #3156883: \Drupal\Core\Url ensure fragment is not an empty string
- #3170648: CKEditorPluginManager::getEnabledButtons throws warnings on PHP 8.0.0 beta3
I think all of the above issue can proceed without worrying about the how and if vendor support works for PHP 8 since the changes are all PHP 7 compatible. And hopefully we can keep the changes PHP 7.0 compatible to make things easy for Drupal 8.
Drupal issues that need a largely working PHP 8 build to test
- #3156887: Add support for \GdImage objects
I think this issue will be okay for PHP 7.0 because it's really only loosening what we expect in \Drupal\system\Plugin\ImageToolkit\GDToolkit::$resource but testing this will be harder without all the above fixes and the fixes to vendor.