private function isAutoMappingDisabled(string $templateName): bool
    {
        if (isset($this->mapping['mandatory'][$templateName])) {
            return false;
        }

        return !$this->environment->getConfig()->get('templates.auto_mapping', true);
    }