Change record status: 
Project: 
Introduced in branch: 
8.4.x
Introduced in version: 
8.4.0
Description: 

\Drupal\Core\Config\TypedConfigManagerInterface gained a new method: createFromNameAndData which leverages the existing methods to make it easy to create a typed config instance without having to have a saved instance of some configuration.

Before

// Setup.
$typed_config = \Drupal::service('config.typed');
$config_name = 'system.site';
$config_data = \Drupal::config('system.site')->get();

// Get typed representation.
$definition = $typed_config->getDefinition($config_name);
$data_definition = $typed_config->buildDataDefinition($definition, $config_data);
$schema = $typed_config->create($data_definition, $config_data);

After

// Setup.
$typed_config = \Drupal::service('config.typed');
$config_name = 'system.site';
$config_data = \Drupal::config('system.site')->get();

// Get typed representation.
$schema = $typed_config->createFromNameAndData($config_name, $config_data);

config.typed service

If you implement this interface, you will need to update your class to have the new method. You should be able to directly use the code in the patch:

 /**
  * {@inheritdoc}
  */
 public function createFromNameAndData($config_name, array $config_data) {
   $definition = $this->getDefinition($config_name);
   $data_definition = $this->buildDataDefinition($definition, $config_data);
   return $this->create($data_definition, $config_data);
 }
Impacts: 
Module developers
Updates Done (doc team, etc.)
Online documentation: 
Not done
Theming guide: 
Not done
Module developer documentation: 
Not done
Examples project: 
Not done
Coder Review: 
Not done
Coder Upgrade: 
Not done
Other: 
Other updates done