title: How to create a role programmatically in Drupal 8?
body: <p>How do I create a role programmatically in Drupal 8?</p>
  
  <p>What am I doing wrong here?</p>
  
  <pre><code>$role = \Drupal\user\Entity\Role::create(['id' =&gt; 'client', 'name' =&gt; 'Client']);
  $role-&gt;save(); 
  </code></pre>