lib/CustomTaxonomy.php
protected function generateTaxonomyName()
    {
        $matches = [];
        preg_match('@\\\\([\w]+)$@', get_called_class(), $matches);
        $taxonomyName = strtolower(
            preg_replace('/(?<=\\w)(?=[A-Z])/', "-$1", $matches[1])
        );

        // Use the existing WordPress taxonomy post_tag with an underscore
        if ($taxonomyName === 'post-tag') {
            $taxonomyName = 'post_tag';
        }

        return $taxonomyName;
    }
protected function generateTaxonomyName()
    {
        $matches = [];
        preg_match('@\\\\([\w]+)$@', get_called_class(), $matches);
        $taxonomyName = strtolower(
            preg_replace('/(?<=\\w)(?=[A-Z])/', "-$1", $matches[1])
        );

        // Use the existing WordPress taxonomy post_tag with an underscore
        if ($taxonomyName === 'post-tag') {
            $taxonomyName = 'post_tag';
        }

        return $taxonomyName;
    }
Overwrite to change the way the taxonomy name is determined.
This value is fed into the TaxonomyBuilder. If an existing taxonomy of
the same name exist, it will load the existing configuration to allow
modification.

@return string