YahnisElsts / plugin-update-checker

A custom update checker for WordPress plugins. Useful if you don't want to host your project in the official WP repository, but would still like it to support automatic updates. Despite the name, it also works with themes.
MIT License
2.22k stars 403 forks source link

Fatal error: Uncaught Error: Class 'PucReadmeParser' not found #389

Open jefferykarbowski opened 4 years ago

jefferykarbowski commented 4 years ago

I am getting this error when pressing "Check for Updates", cant seem to find where it is coming from:

Fatal error: Uncaught Error: Class 'PucReadmeParser' not found in /nas/content/staging/xxxxxxxxxx/wp-content/plugins/xxxxxxxxxx/vendors/plugin-update-checker/Puc/v4p10/Vcs/Api.php:68

Stack trace:

0 /nas/content/staging/xxxxxxxxxx/wp-content/plugins/xxxxxxxxxx/vendors/plugin-update-checker/Puc/v4p10/Vcs/PluginUpdateChecker.php(163): Puc_v4p10_Vcs_Api->getRemoteReadme('2.1.4')

1 /nas/content/staging/xxxxxxxxxx/wp-content/plugins/xxxxxxxxxx/vendors/plugin-update-checker/Puc/v4p10/Vcs/PluginUpdateChecker.php(91): Puc_v4p10_Vcs_PluginUpdateChecker->setInfoFromRemoteReadme('2.1.4', Object(Puc_v4p10_Plugin_Info))

2 /nas/content/staging/xxxxxxxxxx/wp-content/plugins/xxxxxxxxxx/vendors/plugin-update-checker/Puc/v4p10/Plugin/UpdateChecker.php(152): Puc_v4p10_Vcs_PluginUpdateChecker->requestInfo(Array)

3 /nas/content/staging/xxxxxxxxxx/wp-content/plugins/xxxxxxxxxx/vendors/plugin-update-checker/Puc/v4 in /nas/content/staging/xxxxxxxxxx/wp-content/plugins/xxxxxxxxxx/vendors/plugin-update-checker/Puc/v4p10/Vcs/Api.php on line 68

Thank you for this plugin and your time!

YahnisElsts commented 4 years ago

Here are two things to check:

billybigpotatoes commented 3 years ago

I had some issues with composer - when i had 2 plugins installed with plugin update capabilities installed. the require_once statement caused critical wp error - not sure why. Moving to the require plugin-update-checker.php seems to work ok.

I was also not sure if the composer.json file has all the dependancies referenced - as when i built it the vendor directory was quite empty - so i had to copy the vendor dir from your repo.

YahnisElsts commented 3 years ago

The vendor directory in this repository is part of the source and not generated by Composer. If you install this library with Composer, it should automatically download everything including that directory. I just tested it with a fresh project and it put the directory at /vendor/yahnis-elsts/plugin-update-checker/vendor.

If you're downloading the library manually instead, you will need to include the vendor directory, too.

billybigpotatoes commented 3 years ago

It would be great if you can bundle your features via composer - we use composer in our plugins so we need it to function for other libs too.

Your lib deployed via composer - would be fabulous as we can also use composer to automate updates.

D.

On Tue, 25 May 2021 at 20:30, Yahnis Elsts @.***> wrote:

The vendor directory in this repository is part of the source and not generated by Composer. If you install this library with Composer, it should automatically download everything including that directory. I just tested it with a fresh project and it put the directory at /vendor/yahnis-elsts/plugin-update-checker/vendor.

If you're downloading the library manually instead, you will need to include the vendor directory, too.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/YahnisElsts/plugin-update-checker/issues/389#issuecomment-848203537, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIASXL4AITEEU456LG3K7LTPP3HDANCNFSM4RNS5XEA .

--

d

billybigpotatoes commented 3 years ago

What should i include in composer to pull in your packages?

YahnisElsts commented 3 years ago

I'm not sure what you mean by "bundle your features via composer". Judging by the Packagist stats for this library, lots of people already use this package via Composer. Presumably, they also update it via Composer.

What should i include in composer to pull in your packages?

I think simply running this would be enough to add the necessary changes to composer.json: composer require yahnis-elsts/plugin-update-checker

Alternatively, you could do something like this to require the current version:

"require": {
    "yahnis-elsts/plugin-update-checker": "^4.11"
}
billybigpotatoes commented 3 years ago

Brilliant I will get testing

On Wed, 26 May 2021, 17:41 Yahnis Elsts, @.***> wrote:

I'm not sure what you mean by "bundle your features via composer". Judging by the Packagist stats for this library https://packagist.org/packages/yahnis-elsts/plugin-update-checker/stats, lots of people already use this package via Composer. Presumably, they also update it via Composer.

What should i include in composer to pull in your packages?

I think simply running this would be enough to add the necessary changes to composer.json: composer require yahnis-elsts/plugin-update-checker

Alternatively, you could do something like this to require the current version:

"require": { "yahnis-elsts/plugin-update-checker": "^4.11" }

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/YahnisElsts/plugin-update-checker/issues/389#issuecomment-848935741, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIASXJY2U7OVKBJXZOVQETTPUQEJANCNFSM4RNS5XEA .