-
Notifications
You must be signed in to change notification settings - Fork 5
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
Update Taxonomy Generator Templates to Match PHPCS Rules #103
base: master
Are you sure you want to change the base?
Conversation
After working with this on a project, I found that adding type hints to a class extending |
/** | ||
* @var string[] | ||
*/ | ||
protected array $post_types = [ %5$s ]; |
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.
The max version for tribe libs at the moment is PHP 7.2 so this should not include property types (only commented)
@@ -6,5 +6,7 @@ | |||
use Tribe\Libs\Taxonomy\Taxonomy_Subscriber; | |||
|
|||
class Subscriber extends Taxonomy_Subscriber { | |||
protected $config_class = Config::class; | |||
|
|||
protected string $config_class = Config::class; |
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.
Same here
Yes, we would need to release a major version update for tribe libs where we update the entire Monorepo to PHP 7.4+, which definitely needs to done. |
@tarecord what we should do for now is update the generators to have the proper PHPCS ignores, and then later remove them once they are PHP7.4+ compatible. The PHPCS v2 PR on SquareOne has some examples of this: |
Fixes some phpcs issues when generating a taxonomy with
so wp s1 generate tax