cba85/wp-updater

Update your plugin directly in Wordpress using your own system

Installs: 19

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/cba85/wp-updater

1.0.0 2021-04-22 14:08 UTC

This package is auto-updated.

Last update: 2025-09-26 23:34:48 UTC


README

This package has been created to integrate WordPress core updates with your custom plugin.

This Wordpress package is based on Misha Rudrastyh article: Self-Hosted Plugin Updates.

This package is a simple class organized using traits.

Tests

$ ./vendor/bin/phpunit

Wordpress spies

To test the package which call some Wordpress functions, I've created spies functions to simulate them outside a Wordpress environment.

These functions are located in /tests/spies/wordpress.php.

Transient

get_transient() in /tests/spies/wordpress.php simulate a transient retrievement by default. Uncomment the first line to test a remote retrievement.

You have to update tests by commenting/uncommenting some lines in TransientTest.php and UpdateTest.php files depending on the remote or transient information retrievement.