diff options
Diffstat (limited to 'core/modules/update/update.manager.inc')
-rw-r--r-- | core/modules/update/update.manager.inc | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/core/modules/update/update.manager.inc b/core/modules/update/update.manager.inc index f4b18321002b..de29e229dd46 100644 --- a/core/modules/update/update.manager.inc +++ b/core/modules/update/update.manager.inc @@ -26,7 +26,7 @@ use Psr\Http\Client\ClientExceptionInterface; */ #[ProceduralHookScanStop] function _update_manager_check_backends(&$form, $operation) { - @trigger_error(__METHOD__ . '() is deprecated in drupal:11.2.0 and is removed from drupal:12.0.0. There is no replacement. Use composer to manage the code for your site. See https://www.drupal.org/node/3512364', E_USER_DEPRECATED); + @trigger_error(__FUNCTION__ . '() is deprecated in drupal:11.2.0 and is removed from drupal:12.0.0. There is no replacement. Use composer to manage the code for your site. See https://www.drupal.org/node/3512364', E_USER_DEPRECATED); // If file transfers will be performed locally, we do not need to display any // warnings or notices to the user and should automatically continue the @@ -94,7 +94,7 @@ function _update_manager_check_backends(&$form, $operation) { * @throws Exception */ function update_manager_archive_extract($file, $directory) { - @trigger_error(__METHOD__ . '() is deprecated in drupal:11.2.0 and is removed from drupal:12.0.0. There is no replacement. Use composer to manage the code for your site. See https://www.drupal.org/node/3512364', E_USER_DEPRECATED); + @trigger_error(__FUNCTION__ . '() is deprecated in drupal:11.2.0 and is removed from drupal:12.0.0. There is no replacement. Use composer to manage the code for your site. See https://www.drupal.org/node/3512364', E_USER_DEPRECATED); /** @var \Drupal\Core\Archiver\ArchiverInterface $archiver */ $archiver = \Drupal::service('plugin.manager.archiver')->getInstance([ @@ -145,7 +145,7 @@ function update_manager_archive_extract($file, $directory) { * are no errors, it will be an empty array. */ function update_manager_archive_verify($project, $archive_file, $directory) { - @trigger_error(__METHOD__ . '() is deprecated in drupal:11.2.0 and is removed from drupal:12.0.0. There is no replacement. Use composer to manage the code for your site. See https://www.drupal.org/node/3512364', E_USER_DEPRECATED); + @trigger_error(__FUNCTION__ . '() is deprecated in drupal:11.2.0 and is removed from drupal:12.0.0. There is no replacement. Use composer to manage the code for your site. See https://www.drupal.org/node/3512364', E_USER_DEPRECATED); return \Drupal::moduleHandler()->invokeAllDeprecated('There is no replacement. Use composer to manage the code for your site. See https://www.drupal.org/node/3512364', 'verify_update_archive', [$project, $archive_file, $directory]); } @@ -162,7 +162,7 @@ function update_manager_archive_verify($project, $archive_file, $directory) { * Path to local file, or FALSE if it could not be retrieved. */ function update_manager_file_get($url) { - @trigger_error(__METHOD__ . '() is deprecated in drupal:11.2.0 and is removed from drupal:12.0.0. There is no replacement. Use composer to manage the code for your site. See https://www.drupal.org/node/3512364', E_USER_DEPRECATED); + @trigger_error(__FUNCTION__ . '() is deprecated in drupal:11.2.0 and is removed from drupal:12.0.0. There is no replacement. Use composer to manage the code for your site. See https://www.drupal.org/node/3512364', E_USER_DEPRECATED); $parsed_url = parse_url($url); $remote_schemes = ['http', 'https', 'ftp', 'ftps', 'smb', 'nfs']; @@ -172,9 +172,11 @@ function update_manager_file_get($url) { } // Check the cache and download the file if needed. + // @phpstan-ignore function.deprecated $cache_directory = _update_manager_cache_directory(); $local = $cache_directory . '/' . \Drupal::service('file_system')->basename($parsed_url['path']); + // @phpstan-ignore function.deprecated if (!file_exists($local) || update_delete_file_if_stale($local)) { try { $data = (string) \Drupal::httpClient()->get($url)->getBody(); @@ -212,7 +214,7 @@ function update_manager_file_get($url) { * @see update_manager_download_page() */ function update_manager_batch_project_get($project, $url, &$context): void { - @trigger_error(__METHOD__ . '() is deprecated in drupal:11.2.0 and is removed from drupal:12.0.0. There is no replacement. Use composer to manage the code for your site. See https://www.drupal.org/node/3512364', E_USER_DEPRECATED); + @trigger_error(__FUNCTION__ . '() is deprecated in drupal:11.2.0 and is removed from drupal:12.0.0. There is no replacement. Use composer to manage the code for your site. See https://www.drupal.org/node/3512364', E_USER_DEPRECATED); // This is here to show the user that we are in the process of downloading. if (!isset($context['sandbox']['started'])) { @@ -229,6 +231,7 @@ function update_manager_batch_project_get($project, $url, &$context): void { } // Extract it. + // @phpstan-ignore function.deprecated $extract_directory = _update_manager_extract_directory(); try { update_manager_archive_extract($local_cache, $extract_directory); @@ -274,7 +277,7 @@ function update_manager_batch_project_get($project, $url, &$context): void { * @see install_check_requirements() */ function update_manager_local_transfers_allowed() { - @trigger_error(__METHOD__ . '() is deprecated in drupal:11.2.0 and is removed from drupal:12.0.0. There is no replacement. Use composer to manage the code for your site. See https://www.drupal.org/node/3512364', E_USER_DEPRECATED); + @trigger_error(__FUNCTION__ . '() is deprecated in drupal:11.2.0 and is removed from drupal:12.0.0. There is no replacement. Use composer to manage the code for your site. See https://www.drupal.org/node/3512364', E_USER_DEPRECATED); $file_system = \Drupal::service('file_system'); // Compare the owner of a webserver-created temporary file to the owner of |