parameters:
    darvin_utils.new_object.counter.entity.class: Darvin\Utils\NewObject\NewEntityCounter

    darvin_utils.new_object.twig_extension.class: Darvin\Utils\Twig\Extension\NewObjectExtension

services:
    darvin_utils.new_object.counter.entity:
        class: %darvin_utils.new_object.counter.entity.class%
        arguments:
            - "@doctrine.orm.entity_manager"
            - "@darvin_utils.mapping.metadata_factory"

    darvin_utils.new_object.twig_extension:
        class: %darvin_utils.new_object.twig_extension.class%
        arguments:
            - "@darvin_utils.new_object.counter.entity"
        tags:
            - { name: twig.extension }

parameters:
    darvin_utils.new_object.counter.entity.class: Darvin\Utils\NewObject\NewEntityCounter

    darvin_utils.new_object.twig_extension.class: Darvin\Utils\Twig\Extension\NewObjectExtension

services:
    darvin_utils.new_object.counter.entity:
        class: %darvin_utils.new_object.counter.entity.class%
        arguments:
            - "@doctrine.orm.entity_manager"
            - "@darvin_utils.mapping.metadata_factory"

    darvin_utils.new_object.twig_extension:
        class:  %darvin_utils.new_object.twig_extension.class%
        public: false
        arguments:
            - "@darvin_utils.new_object.counter.entity"
        tags:
            - { name: twig.extension }

Make new object Twig extension private.
Make new object Twig extension private.
