only in patch2: unchanged: --- a/core/includes/bootstrap.inc +++ b/core/includes/bootstrap.inc @@ -10,6 +10,7 @@ use Drupal\Component\Render\FormattableMarkup; use Drupal\Component\Utility\Unicode; use Drupal\Core\Config\BootstrapConfigStorageFactory; +use Drupal\Core\Database\Database; use Drupal\Core\Installer\InstallerKernel; use Drupal\Core\Logger\RfcLogLevel; use Drupal\Core\Test\TestDatabase; @@ -141,9 +142,14 @@ /** * Regular expression to match PHP function names. * + * @deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Use + * Database::DRIVER_NAME_PATTERN instead. + * + * @see https://www.drupal.org/node/2936107 + * * @see http://php.net/manual/language.functions.php */ -const DRUPAL_PHP_FUNCTION_PATTERN = '[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*'; +const DRUPAL_PHP_FUNCTION_PATTERN = Database::DRIVER_NAME_PATTERN; /** * $config_directories key for active directory. only in patch2: unchanged: --- a/core/modules/update/update.module +++ b/core/modules/update/update.module @@ -693,7 +693,7 @@ function update_verify_update_archive($project, $archive_file, $directory) { $incompatible = []; /** @var \Drupal\Core\File\FileSystemInterface $file_system */ $file_system = \Drupal::service('file_system'); - $files = $file_system->scanDirectory("$directory/$project", '/^' . DRUPAL_PHP_FUNCTION_PATTERN . '\.info.yml$/', ['key' => 'name', 'min_depth' => 0]); + $files = $file_system->scanDirectory("$directory/$project", '/.*\.info.yml$/', ['key' => 'name', 'min_depth' => 0]); foreach ($files as $file) { // Get the .info.yml file for the module or theme this file belongs to. $info = \Drupal::service('info_parser')->parse($file->uri);