Conversation
This adds a composer.json so this plugin can be installed via composer.
1. Remove auto-update as it's no longer needed. 2. Add check to see if classes have already been defined (this only happens in the transitionary period where the previously installed instance of the plugin exists before it's deleted by wpcomsh)
There's a transitionary state that is possible. This guards against it. Also, it removes the rest of the auto updating code.
493402f to
ccd5759
Compare
Because the plugin class can still be loaded by the existing installed plugin, and there's no way to tell which way it was loaded, the main plugin class is now moved to a separate file that is dynamically loaded only after making sure it hasn't already been loaded by the previously installed plugin.
ccd5759 to
5887879
Compare
This updates the versions everywhere from 0.8.3 to 0.8.4 It leaves the stable version at 0.8.3 for now. And updates the readme
wc-api-dev-class.php
Outdated
There was a problem hiding this comment.
I think you meant The WooCommerce plugin is inactive.
There was a problem hiding this comment.
Yep, looks like it's been this way for a while. Good catch!
composer.json
Outdated
There was a problem hiding this comment.
This version does not follow the composer.json schema https://getcomposer.org/doc/04-schema.md#version because of the . between v and the major.
| @@ -0,0 +1,7 @@ | |||
| { | |||
| "name": "woocommerce/wc-api-dev", | |||
There was a problem hiding this comment.
The composer.json schema recommends avoiding non alphanumeric characters in the name https://getcomposer.org/doc/04-schema.md#name (and yet their example shows dashes so 🤷 )
There was a problem hiding this comment.
Yeah, there are dashes in the others here: https://github.com/Automattic/wpcomsh/blob/master/composer.json
I'm not worried about it, but thanks for being thorough!
allendav
left a comment
There was a problem hiding this comment.
Tests well. A couple small things to look at. Pre-approving.
1. Fixed version format. 2. Fixed type on error notification
|
Thanks, Allen! |
This prepares wc-api-dev to be used by a composer install:
To Test:
The composer functionality will have to be tested from the code that installs it, which will have to come after this is merged.