Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed PSR-0 statement #102

Merged
merged 1 commit into from Aug 26, 2013
Merged

Removed PSR-0 statement #102

merged 1 commit into from Aug 26, 2013

Conversation

SgtK
Copy link
Contributor

@SgtK SgtK commented Aug 24, 2013

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.

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
Copy link
Member

halfdan commented Aug 24, 2013

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
Copy link
Contributor Author

SgtK commented Aug 24, 2013

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
Copy link
Contributor

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

mattab pushed a commit that referenced this pull request Aug 26, 2013
Removed PSR-0 statement since it's not valid at this stage (see dicussion in http://dev.piwik.org/trac/ticket/4074#comment:2 for next steps)
@mattab mattab merged commit a01313a into matomo-org:master Aug 26, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants