We to to deprecate the variable_get, variable_del, variable_set functions as of Drupal 8.0.

Files: 
CommentFileSizeAuthor
#5 2067531-deprecate-variable-3.patch1.35 KBmtift
PASSED: [[SimpleTest]]: [MySQL] 58,279 pass(es). View
#2 2067531-deprecate-variable-2.patch1.35 KBmtift
PASSED: [[SimpleTest]]: [MySQL] 57,869 pass(es). View
#1 2067531-deprecate-variable-1.patch1.22 KBmtift
PASSED: [[SimpleTest]]: [MySQL] 58,131 pass(es). View

Comments

mtift’s picture

Status: Active » Needs review
FileSize
1.22 KB
PASSED: [[SimpleTest]]: [MySQL] 58,131 pass(es). View

Patch is attached.

mtift’s picture

FileSize
1.35 KB
PASSED: [[SimpleTest]]: [MySQL] 57,869 pass(es). View

Fixed formatting

xjm’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: +Configuration system

Looks good to me. Thanks @mtift!

alexpott’s picture

Status: Reviewed & tested by the community » Needs work
+++ b/core/includes/bootstrap.incundefined
@@ -934,8 +938,10 @@ function variable_set($name, $value) {
+ * @see \Drupal\Core\Config::delete()

Actually this one is interesting because the would delete the entire config object (ie. file). I think I more comparable function is Config::clear()

mtift’s picture

Status: Needs work » Needs review
FileSize
1.35 KB
PASSED: [[SimpleTest]]: [MySQL] 58,279 pass(es). View

Revised patch attached

xjm’s picture

Issue tags: +Needs followup

Yeah. I think we should at a minimum rename those methods. As @alexpott pointed out it's also questionable for the current delete() to be on the object at all, but that's another can of worms. And all of that is out of scope here, so tagging for a followup.

xjm’s picture

Status: Needs review » Reviewed & tested by the community
catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed this, but we should probably have included the state/settings systems in the comments as well, not all variable_* calls should be converted to config. We're removing this as soon as we've converted core anyway though, so doesn't matter too much.

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