<?php

namespace Asmaster\EquipTwig\Extension;

class Session extends \Twig_Extension
{
    use SessionTrait;

    /**
     * @return string The extension name
     */
    public function getName()
    {
        return 'session';
    }

    public function getGlobals()
    {
        return [
            'session' => $this->session
        ];
    }
}

<?php

namespace Asmaster\EquipTwig\Extension;

class Session extends \Twig_Extension implements \Twig_Extension_GlobalsInterface
{
    use SessionTrait;

    /**
     * @return string The extension name
     */
    public function getName()
    {
        return 'session';
    }

    public function getGlobals()
    {
        return [
            'session' => $this->session
        ];
    }
}

Implement Twig_Extension_GlobalsInterface for getGlobals() method
Implement Twig_Extension_GlobalsInterface for getGlobals() method
