tomjn / composerpress

Retroactively creates a composer.json for a WordPress site
88 stars 6 forks source link

wpackagist package names incorrectly resolved #8

Open strarsis opened 7 years ago

strarsis commented 7 years ago

@tomjn: Thanks for this very helpful plugin! I is a great timesaver for Bedrock based sites.

Some package names are incorrectly resolved. - Examples:

The plugin name in wordpress.org plugin directory is apparently also used by wpackagist.

tomjn commented 7 years ago

Composerpress doesn't do any resolving, if you use the wrong folder name you get the wrong plugin name

I don't have time to implement that though as it's not a quick fix, it's new functionality, and the kind that will never be 100% accurate, but you're welcome to try On Mon, 11 Sep 2017 at 12:32, strarsis notifications@github.com wrote:

Some package names are incorrectly resolved.

Examples:

  • google-analytics-dashboard-for-wp-gadwp should be google-analytics-dashboard-for-wp
  • text-blocks should be reusable-text-blocks
  • updraftplus-backuprestore should be updraftplus
  • wordfence-security should be wordfence
  • yoast-seo should be wordpress-seo

The plugin name in wordpress.org plugin directory is apparently also used by wpackagist.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/tomjn/composerpress/issues/8, or mute the thread https://github.com/notifications/unsubscribe-auth/AADl59u-JCvKW4MY-IQuGffMrPzOdlKgks5shYrNgaJpZM4PTqMx .

tomjn commented 7 years ago

hmm it doesn't use the folder name actually:

https://github.com/tomjn/composerpress/blob/master/php/plugin/wordpressplugin.php#L17

It does use the composer name if a composer.json is found though. plugin_dir_path could be used to figure out the folder name or file name and use that instead though, @strarsis you good to do a PR?