-
Notifications
You must be signed in to change notification settings - Fork 3
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
Add a plugin generator #218
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@snim2 This generally looks sensible to me, but there are a few undeclared properties used that will generate errors in PHP 8.2. Maybe it'd be worth having unit tests for this class so those would be picked up in CI?
I've realised this will also apply to some of the existing classes that don't have test coverage, so I've opened an issue for that: #221
private $unique_temp_id; | ||
|
||
function __construct($options) { | ||
$this->options = $options; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As a dynamic property, this will generate errors in PHP 8.2
$this->options = $options; | ||
|
||
if(isset($this->options->directory)) { | ||
$this->target_dir = getcwd() . '/' . $this->options->directory; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$target_dir will also need declaring as a property for PHP 8.2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, pending rebase 👍
Fixes #162 Add a new generator to clone code in our WordPress plugin repo: https://github.com/dxw/wordpress-plugin-template
This is to avoid errors in PHP8.x.
a65cb3c
to
5f083e7
Compare
Add a new generator to clone code in our WordPress plugin repo:
https://github.com/dxw/wordpress-plugin-template
Resolves: #162
Testing
Run
whippet generate plugin
and maybe try the relevant options, e.g.--nogitignore