asm89 / twig-cache-extension

The missing cache extension for Twig. Caching template fragments with Twig.
MIT License
388 stars 27 forks source link

Autoloading issues in combination with phpstan #52

Closed odan closed 4 years ago

odan commented 4 years ago

Hello!

I think the autoloading settings of this library cause problems in combination with the latest version of phpstan.

More details: https://github.com/phpstan/phpstan/issues/2983

Defining autoloader with an empty namespace prefix is also a bad idea for performance.

 "autoload": {
        "psr-4": {
            "": "lib/"
        }
    },
    "autoload-dev": {
        "psr-4": {
            "": "test/"
        }
    },

Is it possible to add an namespace prefix in composer.json?