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

Incorrect plugin directory when installing through composer #2

Closed
STOWouters opened this issue Feb 10, 2015 · 7 comments
Closed

Incorrect plugin directory when installing through composer #2

STOWouters opened this issue Feb 10, 2015 · 7 comments
Assignees

Comments

@STOWouters
Copy link
Owner

Phile recently released to v1.4.0, plugin need to be checked for compatibility. moved to issue #4

When instaling the plugin through composer, the created plugin directory is stijn-flipper/philePaginator instead of stijnFlipper/philePaginator.

@STOWouters STOWouters self-assigned this Feb 10, 2015
@bricebou
Copy link

Hi,

I've just installed Phile and wanted to test yout pagination plugin.
But I've an error while loading the plugin.

Using composer to download the plugin, I have the plugins/stijn-flipper/philePaginatorfolder created. Here is my config.php:

$config['plugins'] = array(
   'stijn-flipper\\philePaginator' => array('active' => true),
   'pschmitt\\tags' => array('active' => true), 
);

I've tried with this one, using the name in the composer.json:

$config['plugins'] = array(
    'stijn-flipper\\phile-paginator' => array('active' => true),
    'pschmitt\\tags' => array('active' => true), 
);

But here is the error I get:

the plugin 'stijn-flipper\philePaginator' could not be loaded! [1398536479] (Exception-Wiki)
Phile\Exception\PluginException thrown in file /home/bbrice/WIN_DATA/webdev/Phile/lib/Phile/Bootstrap.php on line 218. 

Thanks :)

@STOWouters
Copy link
Owner Author

You overlooked the README: remove the - tokens from the $config['plugins'] array:

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

Or, in your case:

$config['plugins'] = array(
    'stijnFlipper\\philePaginator' => array('active' => true),
    'pschmitt\\tags' => array('active' => true), 
);

I notice that Phile automatically removes the - character on the plugin name, but not the vendor name. Looks like you've found a bug in Phile :)

EDIT: Oh, and the folder should be plugins/stijnFlipper/philePaginator actually, not plugins/stijn-flipper/philePaginator

@bricebou
Copy link

:/

Thanks :) and sorry for the noise. I didn't notice the way you give to clone your GitHub repository.

However, when using composer, I'm not sure the folder structure is the good one (why would I have had an error in the first place ? or maybe it was simply too late when I tried...).

Thanks again, I'm gonna play with your plugin !

@STOWouters
Copy link
Owner Author

Just did a clean plugin install through composer, I noticed that the folder structure was indeed stijn-flipper/philePaginator instead of stijnFlipper/philePaginator. Hadn't had this issue before, I'll have a talk to the dev of Phile, because I'm not sure if it's a bug in the Phile plugin installer or in composer.

@STOWouters STOWouters changed the title Compatibility check with Phile v1.4.0 Incorrect plugin directory when installing through composer Mar 14, 2015
@STOWouters
Copy link
Owner Author

Alright, I see, change the following entry in your composer.json from:

"phile-cms/plugin-installer-plugin": ">=1.0"

to:

"phile-cms/plugin-installer-plugin": "dev-master"

and it will create the correct directory: stijnFlipper/philePaginator.

@bricebou
Copy link

I've tested and it works perfectly !

Thanks.

@STOWouters
Copy link
Owner Author

Yeah 👍 , the phile plugin installer from packagist uses v1.0.0 which doesn't include the fix with dashes (fixed in v1.0.1), I'll close this issue and ticket an issue to the dev to bump the plugin installer on packagist to v1.0.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants