@SgtK opened this Pull Request on August 24th 2013 Contributor

Since Piwik does NOT follow PSR-0, composer makes unnecessary file system calls for every single class. Piwik's own autoloader knows how to load Piwik's classes.

@halfdan commented on August 24th 2013 Member

Can you please point out where Piwik does not comply with PSR-0? The main goal right now is to be compatible to PSR-0 rather than removing the statement.

@SgtK commented on August 24th 2013 Contributor

According to PSR-0, namespace is translated to directory structure by changing backslashes to directory separators. When composer is trying to load a class, lets take \Piwik\Plugins\Actions\API for example, it checks if a file plugins/Piwik/Plugins/Actions/API.php exists. Since it does not, PHP asks Piwik's autoloader (which is second in the autoloader stack) if it can find the class.

@robocoder commented on August 25th 2013 Contributor

I already commented in http://dev.piwik.org/trac/ticket/4074#comment:2 about moving the directories to comply with PSR-0.

This Pull Request was closed on August 26th 2013
Powered by GitHub Issue Mirror