From 2bb38297c0ff77f1a18de7a81d0297d8f1e62d5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20St=C3=B6ckler?= <tobiasstoeckler@googlemail.com> Date: Tue, 23 Feb 2016 00:25:09 +0100 Subject: [PATCH] by tstoeckler: Add deprecation notices to all legacy functions and hooks --- libraries.api.php | 6 ++++++ libraries.module | 26 ++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/libraries.api.php b/libraries.api.php index 6062936..637616f 100644 --- a/libraries.api.php +++ b/libraries.api.php @@ -172,6 +172,8 @@ * Additional top-level properties can be registered as needed. * * @see hook_library() + * + * @deprecated Will be removed before a stable Drupal 8 release. */ function hook_libraries_info() { // The following is a full explanation of all properties. See below for more @@ -411,6 +413,8 @@ function hook_libraries_info() { * integration files inside of an array, whose key is the module name. * * @see hook_libraries_info() + * + * @deprecated Will be removed before a stable Drupal 8 release. */ function hook_libraries_info_alter(&$libraries) { $files = array( @@ -435,6 +439,8 @@ function hook_libraries_info_alter(&$libraries) { * * @return * An array of paths. + * + * @deprecated Will be removed before a stable Drupal 8 release. */ function hook_libraries_info_file_paths() { // Taken from the Libraries test module, which needs to specify the path to diff --git a/libraries.module b/libraries.module index 218de52..34e2913 100644 --- a/libraries.module +++ b/libraries.module @@ -38,6 +38,8 @@ function libraries_library_info_build() { * The path to the specified library or FALSE if the library wasn't found. * * @ingroup libraries + * + * @deprecated Will be removed before a stable Drupal 8 release. */ function libraries_get_path($name, $base_path = FALSE) { $libraries = &drupal_static(__FUNCTION__); @@ -72,6 +74,8 @@ function libraries_get_path($name, $base_path = FALSE) { * A list of library directories. * * @ingroup libraries + * + * @deprecated Will be removed before a stable Drupal 8 release. */ function libraries_get_libraries() { $searchdir = array(); @@ -128,6 +132,8 @@ function libraries_get_libraries() { * @return * An array of info files, keyed by library name. The values are the paths of * the files. + * + * @deprecated Will be removed before a stable Drupal 8 release. */ function libraries_scan_info_files() { $profile = drupal_get_path('profile', drupal_get_profile()); @@ -167,6 +173,8 @@ function libraries_scan_info_files() { * either 'info', 'pre-detect', 'post-detect', or 'load'. * @param $library * An array of library information, passed by reference. + * + * @deprecated Will be removed before a stable Drupal 8 release. */ function libraries_invoke($group, &$library) { foreach ($library['callbacks'][$group] as $callback) { @@ -186,6 +194,8 @@ function libraries_invoke($group, &$library) { * An array of library information, passed by reference. * @param $callback * A string containing the callback to apply to all parts of a library. + * + * @deprecated Will be removed before a stable Drupal 8 release. */ function libraries_traverse_library(&$library, $callback) { // Always apply the callback to the top-level library. @@ -240,6 +250,8 @@ function libraries_traverse_library(&$library, $callback) { * * @see libraries_info() * @see libraries_invoke() + * + * @deprecated Will be removed before a stable Drupal 8 release. */ function libraries_prepare_files(&$library, $version = NULL, $variant = NULL) { // Both the 'files' property and the 'integration files' property contain file @@ -288,6 +300,8 @@ function libraries_prepare_files(&$library, $version = NULL, $variant = NULL) { * * @see libraries_info() * @see libraries_invoke() + * + * @deprecated Will be removed before a stable Drupal 8 release. */ function libraries_detect_dependencies(&$library, $version = NULL, $variant = NULL) { if (isset($library['dependencies'])) { @@ -337,6 +351,8 @@ function libraries_detect_dependencies(&$library, $version = NULL, $variant = NU * * @todo Re-introduce support for include file plugin system - either by copying * Wysiwyg's code, or directly switching to CTools. + * + * @deprecated Will be removed before a stable Drupal 8 release. */ function &libraries_info($name = NULL) { // This static cache is re-used by libraries_detect() to save memory. @@ -423,6 +439,8 @@ function &libraries_info($name = NULL) { * An array of library information, passed by reference. * @name * The machine name of the passed-in library. + * + * @deprecated Will be removed before a stable Drupal 8 release. */ function libraries_info_defaults(&$library, $name) { $library += array( @@ -477,6 +495,8 @@ function libraries_info_defaults(&$library, $name) { * error message. * * @see libraries_info() + * + * @deprecated Will be removed before a stable Drupal 8 release. */ function libraries_detect($name) { // Re-use the statically cached value of libraries_info() to save memory. @@ -607,6 +627,8 @@ function libraries_detect($name) { * - loaded: Either the amount of library files that have been loaded, or * FALSE if the library could not be loaded. * See hook_libraries_info() for more information. + * + * @deprecated Will be removed before a stable Drupal 8 release. */ function libraries_load($name, $variant = NULL) { $loaded = &drupal_static(__FUNCTION__, array()); @@ -666,6 +688,8 @@ function libraries_load($name, $variant = NULL) { * * @return * The number of loaded files. + * + * @deprecated Will be removed before a stable Drupal 8 release. */ function libraries_load_files($library) { @@ -761,6 +785,8 @@ function libraries_load_files($library) { * A string containing the version of the library. * * @see libraries_get_path() + * + * @deprecated Will be removed before a stable Drupal 8 release. */ function libraries_get_version($library, $options) { // Provide defaults. -- GitLab