PhileCMS / Phile

A flat file CMS with a swappable parser and template engine.
https://philecms.github.io/
Other
257 stars 49 forks source link

[BUG] vendor with dashes #137

Closed STOWouters closed 10 years ago

STOWouters commented 10 years ago

Now, I finally wrote a Phile plugin. :smiley: There's one problem however: my vendor name is stijn-flipper, and the namespace \Phile\Plugin\Stijn-Flipper\PhileMathJax is illegal. I've fixed a patch involving some modification on both lib/Phile/Bootstrap.php and lib/vendor/Phile/lib/vendor/phile-cms/plugin-installer-plugin/src/Phile/Composer/PluginInstaller.php, so the fixes requires to be applied in one time.

The patch does this:

What do you think? Is it ok or need it some mods? I think this is a hotfix for v1.3.0 though :).

And how should I send the PR? Because the lib/vendor/Phile/lib/vendor/phile-cms/plugin-installer-plugin/src/Phile/Composer/PluginInstaller.php comes from another repo.

STOWouters commented 10 years ago

Ok, I found a patch that only modifies lib/vendor/Phile/lib/vendor/phile-cms/plugin-installer-plugin/src/Phile/Composer/PluginInstaller.php, so I'll send a PR to phile-cms/plugin-installer-plugin repository instead.

STOWouters commented 10 years ago

When the above PR is merged, you only have to put something like this in your config:

$config['plugins']['stijnFlipper\\phileMathjax'] = array('active' => true);

And you can use the namespace Phile\Plugin\StijnFlipper\PhileMathjax

NeoBlack commented 10 years ago

thx for your patch, I have merged it and created an new release 1.0.1 of the plugin installer: https://github.com/PhileCMS/ComposerPluginInstaller/releases/tag/1.0.1

STOWouters commented 10 years ago

Great! Thanx! :+1: