Programmatically create a term? I'm attempting to add a lot of terms (~200) to a vocabulary, but I can't find any import modules that are updated for Drupal 8, and it seems the functions for doing this in Drupal 7 don't exist in Drupal 8. So, can anyone point me in the right direction for doing this?

I attempted to do it with entity_create, as suggested in the comments, with this code:

$term_create = entity_create('taxonomy_term', array('name' =&gt; 'test', 'vocabulary_name' =&gt; 'client'));


but I got this error:

Drupal\Core\Entity\EntityStorageException: Missing bundle for entity type taxonomy_term in Drupal\Core\Entity\FieldableEntityStorageControllerBase-&gt;create() (line 65 of core/lib/Drupal/Core/Entity/FieldableEntityStorageControllerBase.php).


Any ideas?
You know that you want something from taxonomy module so first you need to look in Drupal\taxonomy\Entity -- or the corresponding directory -- you will find the Term class there. Now look at the annotation, it says @ContentEntityType and in there:

*   entity_keys = {
*     "id" = "tid",
*     "bundle" = "vid",
*     "label" = "name",
*     "uuid" = "uuid"
*   },


So, what you want is

$term = Term::create([
  'name' =&gt; 'test', 
  'vid' =&gt; 'client',
])-&gt;save();


because the label entity key is name and the bundle entity key is vid. I added a -&gt;save() call as well as I presume you wanted to save it too.