YoastCS: upgrade to WordPressCS 3.0.1 #323
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Composer: use WordPressCS 3.0.1+
Modernize.FunctionCalls.Dirname.Nested
(PHP 7.0+) error code as the majority of the Yoast repos have a PHP 7.2 minimum.Modernize.FunctionCalls.Dirname.Nested
(PHP 7.0+) error code specifically for the YoastCS codebase as it still has a PHP 5.4 minimum.Refs:
NamingConventions/ObjectNameDepth: account for upstream WPCS changes
Update some function calls using WPCS native utilities, which still exist, but have been moved around or have a changed signature.
Ref:
NamingConventions/ValidHookName::transform(): sync parameter names
The parameter name of the upstream method was updated in WPCS 3.0.0 to not overlap with a reserved keyword.
And for potential future support of function calls to sniff methods using named parameters, the signature of a method in a child class overloading a method in a parent class should be kept in sync.
This makes it so for the
NamingConventions/ValidHookName::transform()
method.CS: minor tweaks to comply with WordPressCS 3.0