How do I use Hook_update_N to update an FieldConfigStorage? function some_config_update_8101(){


if ( !FieldConfig::load('image_byline') ){
    $config_path = drupal_get_path('module', 'some_config') . '/config/install/field.field.node.main_image.field_image_byline.yml';
    $data = Yaml::parse($config_path);
    \Drupal::configFactory()-&gt;getEditable('field.field.node.main_image.field_image_byline')-&gt;setData($data)-&gt;save(TRUE);
    $message .= "FieldConfig installed for module some_config.\n";
  }
  else {
    $message .= "It didn't work!\n";
  }


     if( !FieldConfigStorage::load('image_byline') ){
        $config_path = drupal_get_path('module', 'some_config') . '/config/install/field.storage.node.field_image_byline.yml';
        $data = Yaml::parse($config_path);
        \Drupal::configFactory()-&gt;getEditable('field.storage.node.field_image_byline')-&gt;setData($data)-&gt;save(TRUE);
        $message .= "FieldConfigStorage installed for module some_config.\n";
     }
     else{
       $message .= "That didn't work either!\n";
    }


Above is the code I am attempting to use to update a content type with a new field on my site.  When I run the dbup command I get "PHP Fatal error:  Using $this when not in object context in EntityStoageBase.php.

How is my code affecting the context of EntityStorageBase, if I have not changed code in that file?
FieldConfigStorage::load() isn't static, so you can't use it statically.

Get an instance of FieldConfigStorage instead, and use that

if ($storage-&gt;load('image_byline')) {
  // ...
}