Update Taxonomy Generator Templates to Match PHPCS Rules#103
Update Taxonomy Generator Templates to Match PHPCS Rules#103
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.
The max version for tribe libs at the moment is PHP 7.2 so this should not include property types (only commented)
| class Subscriber extends Taxonomy_Subscriber { | ||
| protected $config_class = Config::class; | ||
|
|
||
| protected string $config_class = Config::class; |
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