-
Notifications
You must be signed in to change notification settings - Fork 14
fix: prevent conflicts with old plugin #67
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
Conversation
- update phpcs.xml.dist rules to better align with WPGraphQL core
… from accidentally adding classes that match the old version of the plugin. We don't want old functions to be available in the new plugin, intentionally.
- update testing-integration workflow to test against WP 6.2
Pull Request Test Coverage Report for Build 58ae3ce820468e47d3f3cd6919c92d5fc1a85b04-PR-67Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
I see the action 'graphql_acf_match_location_rule'. Does that need to change? |
Is it intentional not to change the name of the actions that are triggered in Field Type Registry? graphql_acf_registry_init and graphql_acf_register_field_types. |
@markkelnar looks like I updated the filters but not the actions 🤦🏻♂️. Good catch. I updated the actions and the table documenting the differences. |
…orward slashes without causing a linting error
What does this implement/fix? Explain your changes.
This ensures actions and filters are unique to this version of the plugin. This means that any custom code targeting hooks and filters of the previous WPGraphQL for ACF will not execute when this plugin is active and won't cause unintended side effects.
This also adjusts Class names to be unique to ensure any code from extending codebases don't accidentally all code from this version of the plugin.
What currently open issues does this close or contribute?
closes #65
closes #66
Other Notes
Failing Schema Linter
Note, the Schema Linter test is failing because the previous release action did not upload the Schema Artifact to the release: https://github.com/wp-graphql/wpgraphql-acf/releases/tag/v2.0.0-beta.3.1.0
Action / Filter comparison across versions
2.0.0-beta.4.0 converts to a
wpgraphql/acf/${hook_name}
convention.We believe this is a bit more readable and makes it more clear what the filter/hook is intended for.
We also believe this will help with folks upgrading. If anyone had custom code that extended v0.6 or prior, it might be easy to miss that it's not working because the hook name is
graphql_acf_*
instead ofwpgraphql_acf_*
where it might be easily overlooked that thewp
was added, thus causing much time banging heads against a desk and pulling hair out before realizing the change.We believe it will be more clear if the user is looking at docs for the latest version of WPGraphQL and sees
wpgraphql/acf/*
they would know immediately that their old action withgraphql_acf_*
would not be firing, thus saving hair and desks.