There is an issue #1957142: Replace config() with Drupal::config() to replace all calls to config() with Drupal::config(). However this is unlikely to be implemented until code freeze, therefore config() should be deprecated in the meantime.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Eli-T’s picture

Status: Active » Needs review
FileSize
675 bytes
damiankloip’s picture

Status: Needs review » Needs work

Nice, i agree that we should mark this @deprecated and then deal with #1957142: Replace config() with Drupal::config(). Although I still don't see the point in making lots of issues out of that but hey, not a problem here :)

+++ b/core/includes/config.incundefined
@@ -72,6 +72,9 @@ function config_get_storage_names_with_prefix($prefix = '') {
+ * @deprecated This function has been replaced by the \Drupal::config function.

add parenthesis to config(), and we should use 'method' and not 'function'

Eli-T’s picture

Status: Needs work » Needs review
FileSize
675 bytes

Changes suggested in #2 implemented.

damiankloip’s picture

Assigned: Eli-T » Unassigned
Status: Needs review » Reviewed & tested by the community

Thank you. Looks good to me.

Status: Reviewed & tested by the community » Needs work
Issue tags: -Novice

The last submitted patch, config_deprecate_config-2028149-3.patch, failed testing.

Eli-T’s picture

Status: Needs work » Needs review
Issue tags: +Novice
Eli-T’s picture

Status: Needs review » Reviewed & tested by the community

Returning to rtbc following successful retest with no code changes.

alexpott’s picture

Status: Reviewed & tested by the community » Needs work
Eli-T’s picture

Status: Needs work » Needs review
FileSize
723 bytes

Added Drupal 8.0 as version at which the function was deprecated and added @see block to the replacement.

damiankloip’s picture

Status: Needs review » Reviewed & tested by the community

Lookin' good

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to 8.x. Thanks.

Automatically closed -- issue fixed for 2 weeks with no activity.