diff --git a/core/includes/config.inc b/core/includes/config.inc
index 32ba50d865a0af09f0bb5ca3e452d388bb3511ad..9e2b6dd256b66cac36441fec189ba7d259686b50 100644
--- a/core/includes/config.inc
+++ b/core/includes/config.inc
@@ -72,6 +72,9 @@ function config_get_storage_names_with_prefix($prefix = '') {
  * @code config('book.admin') @endcode will return a configuration object in
  * which the book module can store its administrative settings.
  *
+ * @deprecated This function has been replaced by the \Drupal::config() method.
+ * Use that instead.
+ *
  * @param string $name
  *   The name of the configuration object to retrieve. The name corresponds to
  *   a configuration file. For @code config('book.admin') @endcode, the config