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

Allow for underscores in plugin names #10541

Closed
bkbeckman opened this issue Sep 22, 2016 · 3 comments
Closed

Allow for underscores in plugin names #10541

bkbeckman opened this issue Sep 22, 2016 · 3 comments
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.
Milestone

Comments

@bkbeckman
Copy link
Contributor

Currently, Piwik restricts the naming of plugins using the following regular expression: '/^[a-zA-Z]([a-zA-Z0-9]*)$/D'. I propose that any valid PHP class name be a valid plugin name. According to the PHP documentation, a valid class name is defined as,

The class name can be any valid label, provided it is not a PHP reserved word. A valid class name starts with a letter or underscore, followed by any number of letters, numbers, or underscores. As a regular expression, it would be expressed thus: ^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*$.

Barring this expansion. I propose that underscore character included as a valid character for plugin names.

@mattab
Copy link
Member

mattab commented Sep 26, 2016

There is a theme with an _ here: http://themes.piwik.org/Proteus_Bold
Did we maybe change the naming rules after this theme was published?

@mattab
Copy link
Member

mattab commented Oct 22, 2016

This will be fixed with #10737

@mattab mattab added this to the 2.17.0 milestone Oct 22, 2016
@mattab mattab added the Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. label Oct 22, 2016
@mattab
Copy link
Member

mattab commented Oct 22, 2016

This should be fixed in 2.17.0-b2 released in a few minutes

@mattab mattab closed this as completed Oct 22, 2016
@mattab mattab changed the title Allow for underscores (and perhaps other characters) in plugin names. Allow for underscores in plugin names Oct 26, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.
Projects
None yet
Development

No branches or pull requests

2 participants