Plugin refactor with Interfaces.#125
Closed
justlevine wants to merge 14 commits intoashhitch:masterfrom
Closed
Conversation
…-graphql-yoast-seo into feat/base-refactor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 inheritSeoBaseFieldsand are implemented byContentNodeandTermNoderespectively. (Suggestion for possible Typing Improvements #119 )Notes:
composer dump-autoload --no-dev --optimizeshould be run before committing. To autoload dev dependencies (for typehints and to stan/lint), runcomposer dump-autoload.composer phpcsandcomposer 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.@todowill show a list of things that need to be edited. They are mostly file versions or missing GraphQL descriptions.WP{post_type}InfoonlyWPPageInfo).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
buildfunctions 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