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.
This PR is a complete refactor of the plugin. There are no breaking schema changes.
Highlights:
SEOBaseFields
,ContentNodeWithSEO
, andTermNodeWithSEO
. The latter two inheritSeoBaseFields
and are implemented byContentNode
andTermNode
respectively. (Suggestion for possible Typing Improvements #119 )Notes:
composer dump-autoload --no-dev --optimize
should be run before committing. To autoload dev dependencies (for typehints and to stan/lint), runcomposer dump-autoload
.composer phpcs
andcomposer phpstan
. These seem to be mostly bad types / non-existent properties, but without unit tests in place I didnt feel comfortable deviating from the original code.@todo
will show a list of things that need to be edited. They are mostly file versions or missing GraphQL descriptions.WP{post_type}Info
onlyWPPageInfo
).PHP Breaking Changes
As mentioned above, theres been a minimum PHP version bump and a namespace change. Most function signatures have changed as well (they now type safety). I left all the global functions alone (in access-functions.php ), but the
build
functions that werent reused across classes are now in the relevant php class. (Imo all the global functions should be deprecated and moved toWPGraphQL\YoastSEO\Utils
).Schema Changes