Generate plugin should no longer ask whether it should also create an API and a controller · Issue #6145 · matomo-org/matomo · GitHub
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

Generate plugin should no longer ask whether it should also create an API and a controller #6145

Closed
tsteur opened this issue Sep 7, 2014 · 0 comments
Assignees
Labels
Task Indicates an issue is neither a feature nor a bug and it's purely a "technical" change.
Milestone

Comments

@tsteur
Copy link
Member

tsteur commented Sep 7, 2014

After we have created a plugin using ./console generate:plugin we are currently asking a developer whether he wants to generate an API and a Controller as well. When we created the first command to generate a plugin one often needed an API and a Controller as they were needed for a lot of things. This is no longer the case. Especially that a plugin developer needs both an API and a Controller is very rare. In all the tutorials / blog posts I am currently always writing to answer this question with "No". Therefore I propose to remove the question whether we should create those components as well. I think it is even rather confusing asking this question since a plugin developer would at this stage maybe not even know whether he actually needs them or not as it is not explained in which cases he needs them. In the end he might answer with yes although he does not need it.

Alternatively we should only ask whether we should create a controller as well but even this is rarely needed. For widgets, reports, ... it is no longer needed. Only if someone wants to add an item to the menu but then no API is needed. If someone creates a report we will automatically create an API as well.

I propose to only generate a very basic plugin structure when executing generate:plugin. It should not even generate the JavaScript file. In the success message we could add some more text explaining how to proceed and what his options are. We could also mention all the other generate:* commands and for what they are actually good. Maybe along with some links to blog posts/ developer guides.

After removing the if condition in generate plugin we also have to update tutorials.

To be discussed...

@tsteur tsteur added the Task Indicates an issue is neither a feature nor a bug and it's purely a "technical" change. label Sep 7, 2014
@tsteur tsteur modified the milestones: Piwik 2.7.0, Piwik 2.8.0 Sep 7, 2014
tsteur added a commit that referenced this issue Sep 23, 2014
tsteur added a commit to matomo-org/developer-documentation that referenced this issue Sep 23, 2014
tsteur added a commit that referenced this issue Sep 23, 2014
@tsteur tsteur closed this as completed Sep 23, 2014
@tsteur tsteur self-assigned this Sep 23, 2014
@tsteur tsteur modified the milestones: Piwik 2.7.0, Piwik 2.8.0 Sep 23, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Task Indicates an issue is neither a feature nor a bug and it's purely a "technical" change.
Projects
None yet
Development

No branches or pull requests

1 participant