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

Rename $MyPlugin.php files to Plugin.php name #4129

Closed
mattab opened this issue Sep 6, 2013 · 4 comments
Closed

Rename $MyPlugin.php files to Plugin.php name #4129

mattab opened this issue Sep 6, 2013 · 4 comments
Labels
Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical. Task Indicates an issue is neither a feature nor a bug and it's purely a "technical" change. wontfix If you can reproduce this issue, please reopen the issue or create a new one describing it.
Milestone

Comments

@mattab
Copy link
Member

mattab commented Sep 6, 2013

To be consistent with API.php, Controller.php, Archiver.php, we should have the plugin main class' file be called Plugin.php

@halfdan
Copy link
Member

halfdan commented Sep 6, 2013

That is not a good idea if you ask me. The current convention works really great. If we rename the class to Plugin we would have an immediate conflict with \Piwik\Plugin which Plugin needs to extend from.

I think this really would be a poor decision to make. Right now we have a great convention naming the class after the folder!

Please keep it that way.

@mattab
Copy link
Member Author

mattab commented Sep 6, 2013

The ticket is only about the filename. The class does not change. does it make sense?

@halfdan
Copy link
Member

halfdan commented Sep 7, 2013

Not really :( The autoloader expects the class to be in a file that matches the class name?

While it would be possible to change the autoloader, I don't see the benefit in doing this.. I really like the current convention we have. It is clear and easy to work with.

@mattab
Copy link
Member Author

mattab commented Sep 7, 2013

I see that it would break namespace convention. In this case I agree this is good enough reason to cancel.

@mattab mattab added this to the 2.0 - Piwik 2.0 milestone Jul 8, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical. Task Indicates an issue is neither a feature nor a bug and it's purely a "technical" change. wontfix If you can reproduce this issue, please reopen the issue or create a new one describing it.
Projects
None yet
Development

No branches or pull requests

2 participants