We also need to remove the variable table itself, and @berdir pointed out that "there's also a VariableTest that you can remove and SystemTestController::variable_get() including the route that points to it"

There are still some direct uses of the variable table in update-related functions, but these can be ignored because these functions are now only useful as a reference for the migrate initiative.

As long as we're able to cleanly separate the two parts of (1) the subsystem and (2) the subsystem's usage, it makes sense to distill, identify, and discuss the necessary changes independently of each other. We can merge the issues later, but it helps to have a clear picture first.

Thanks for the major pointer of missing the {variable} table! :)

To wit: One of the primary reasons to keep these functional changes separate:

// NOTE: {variable} needs to be created before all other tables, as
// some database drivers, e.g. Oracle and DB2, will require variable_get()
// and variable_set() for overcoming some database specific limitations.
$schema['variable'] = array(

Thankfully, the comment does not explain why and does not point (@see) to anything else. ;-)

However, my greps for this and the other issue did not yield any results in database drivers. So my only hope is that this comment is outdated and obsolete, but I'm not sure... :-/

Reroll since core/lib/Drupal/Core/EventSubscriber/ConfigGlobalOverrideSubscriber.php no longer exists and a couple of minor comment edits since the phrase "Drupal variables" doesn't really make any sense.

Other than hook_update_N, upgrade tests, Migrate code, and core/scripts/generate-d6-content.sh, all variable code is gone.
Most of the additions to this patch are working around the setting of the request, or adding @todos.

Will provide another patch that removes all the $conf/$config related todo's, I think that's unecessary, will just unecessary conflict with patches that are already in that issue and once this is in, it will simply have to get rid of all the $conf left-overs.

Here's another patch that does the same and changes/reverts a few more things.

- Revert the changed variable order in drupal_settings_initialize()
- Revert the removal of the similar global $conf in _drupal_load_test_overrides(), I think we should continue to support config overrides like that and will just have to rename it then.
- Revert changes to the update_variable_*() function docblocks, they will be removed in #2168011: Remove all 7.x to 8.x update hooks and disallow updates from the previous major version, which is close to RTBC as well, so let's not mess with that unnecessarily.
- Instead of simply dropping it, converted the $conf removal in DrupalKernelTest to settings, which is actually what the PhpStorageFactory is now using. There was also a second usage of $global conf in there which I updated too
- Instead of simply removing the bogus DatabaseStorageTest $conf change, I replaced it with a setting, to make it explicit that we are using the database backend and aren't just relying on the default.

I think we need one additional follow-up to move container_service_providers to settings instead of using global $conf, we have one for $config and for system.file:path.private.

I've updated https://drupal.org/node/1500260/revisions/view/6872993/6873033 a tiny bit for changes in core to code style and the typification of config yaml, but not sure what else would be needed to cover this issue. That already mentions variable_get()/set/del are replaced with the config() API. Maybe more examples would be nice, eg. on how to del/remove things. But otherwise what is missing?