Please turn all files to PSR-4 !!! capsule all function to class !
Functions which are not in a class are purely internal functions used by Twig. So there would be no benefit for users to migrate them.
Regarding PSR-4, Twig is not yet fully migrated to namespaces, so this would be hard.
and in the Composer era, this is irrelevant anyway, as you don't need to configure autoloaders yourselves anymore (and Composer fully supports autoloading the Twig code)
I think being psr-4 compatible should be the way to go.
psr-4 is created to generally address these autoloading questions, so stick to the standard if possible.
Not everybody is using composer due to security or networking issues.
so this is a +1 from me.
I'm closing this one as migration to PSR-4 is under way. The first step being the switch to namespaces.
Most helpful comment
I'm closing this one as migration to PSR-4 is under way. The first step being the switch to namespaces.