<?php

namespace {{ namespace|normalizeNamespace }};

{% block use_statements %}
use Symfony\Component\HttpKernel\Bundle\Bundle;
use {{ namespace|normalizeNamespace }}\DependencyInjection\{{ extension_name }}Extension;
{% endblock use_statements %}

{% block class_definition %}
class {{ bundle }} extends Bundle
{% endblock class_definition %}
{
{% block class_body %}
    public function getContainerExtension()
    {
        if (null === $this->extension) {
            $this->extension = new {{ extension_name }}Extension();
        }

        return $this->extension;
    }

    protected function getContainerExtensionClass()
    {
        // return {{ extension_name }}Extension::class;

        return $this->getNamespace().'\\DependencyInjection\\{{ extension_name }}Extension';
    }
{% endblock class_body %}
}

<?php

namespace {{ namespace|normalizeNamespace }};

{% block use_statements %}
use Symfony\Component\HttpKernel\Bundle\Bundle;
use {{ namespace|normalizeNamespace }}\DependencyInjection\{{ extension_name }}Extension;
{% endblock use_statements %}

{% block class_definition %}
class {{ bundle }} extends Bundle
{% endblock class_definition %}
{
{% block class_body %}
    public function getContainerExtension()
    {
        if (null === $this->extension) {
            $this->extension = new {{ extension_name }}Extension();
        }

        return $this->extension;
    }

    protected function getContainerExtensionClass()
    {
        return {{ extension_name }}Extension::class;
    }
{% endblock class_body %}
}

Use ::class constant for Symfony Bundle template
Use ::class constant for Symfony Bundle template
