-
Notifications
You must be signed in to change notification settings - Fork 202
Drupal 9 compatibility for 3.x #1067
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
Drupal 9 compatibility for 3.x #1067
Conversation
'core: 8.x' not needed for 8.8+ 'core_version_requirement' not needed for test modules https://www.drupal.org/node/3070687 Co-authored-by: Damien McKenna <[email protected]>
Co-authored-by: Damien McKenna <[email protected]>
Co-authored-by: Damien McKenna <[email protected]>
…it\Framework\MockObject\MockObject Co-authored-by: Damien McKenna <[email protected]>
Co-authored-by: Damien McKenna <[email protected]>
Codecov Report
@@ Coverage Diff @@
## 8.x-3.x #1067 +/- ##
==========================================
Coverage 78.71% 78.72%
Complexity 1139 1139
==========================================
Files 192 192
Lines 3026 3027 +1
==========================================
+ Hits 2382 2383 +1
Misses 644 644
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I created a patch from #1067 and applied successfully to 3.x-dev. :tallyhappy:
Upgrade status marks as green. However, few warnings that could be fixed (maybe in a separate issue?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have tested this PR with 9.0.6 and all my queries and mutations are working as expected. Nice work!
The warnings mentioned seem to be related to Symfony rather Drupal so they shouldn't be blockers
- graphql |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know this is small, but we should be using the new format for dependencies, graphql:graphql
- block | ||
- block_content |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As above
@@ -2,6 +2,6 @@ name: GraphQL Breadcrumbs test | |||
type: module | |||
description: 'Test for breadcrumbs.' | |||
package: GraphQL | |||
core: 8.x | |||
core_version_requirement: ^8.8 || ^9 | |||
dependencies: | |||
- graphql_breadcrumbs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See above
@@ -2,7 +2,7 @@ type: module | |||
name: GraphQL Requests Test | |||
description: Dummy callbacks for internal request testing. | |||
package: Testing | |||
core: 8.x | |||
core_version_requirement: ^8.8 || ^9 | |||
hidden: TRUE | |||
dependencies: | |||
- graphql_core |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again
@@ -1,5 +1,5 @@ | |||
name: 'GraphQL Tests: Menu' | |||
type: module | |||
core: 8.x | |||
core_version_requirement: ^8.8 || ^9 | |||
dependencies: | |||
- system |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
again.
@@ -2,7 +2,7 @@ type: module | |||
name: GraphQL Enumeration Test | |||
description: Test enumeration plugins. | |||
package: Testing | |||
core: 8.x | |||
core_version_requirement: ^8.8 || ^9 | |||
hidden: TRUE | |||
dependencies: | |||
- graphql |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
...
@@ -2,7 +2,7 @@ type: module | |||
name: GraphQL Override Test | |||
description: Test plugin overrides in graphql schema. | |||
package: Testing | |||
core: 8.x | |||
core_version_requirement: ^8.8 || ^9 | |||
hidden: TRUE | |||
dependencies: | |||
- graphql_plugin_test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
...
@@ -2,7 +2,7 @@ type: module | |||
name: GraphQL Test | |||
description: Provides a default schema plugin for testing. | |||
package: Testing | |||
core: 8.x | |||
core_version_requirement: ^8.8 || ^9 | |||
hidden: TRUE | |||
dependencies: | |||
- graphql |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
...
@@ -1,7 +1,6 @@ | |||
name: GraphQL Core | |||
type: module | |||
description: 'Provides type system plugins and derivers on behalf of core modules.' | |||
package: GraphQL | |||
core: 8.x | |||
package: Testing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why? This is not a 'Testing' package - it is a normal submodule that is meant to be installed by users.
* Update core_version_requirement for Drupal 8.8+ and 9+ 'core: 8.x' not needed for 8.8+ 'core_version_requirement' not needed for test modules https://www.drupal.org/node/3070687 Co-authored-by: Damien McKenna <[email protected]> * Test D9.0 on Travis CI * Replace deprecated drupal_set_message() with messenger->addMessage() Co-authored-by: Damien McKenna <[email protected]> * Replace deprecated file_directory_temp() with getTempDirectory() Co-authored-by: Damien McKenna <[email protected]> * Replace deprecated PHPUnit_Framework_MockObject_MockObject with PHPUnit\Framework\MockObject\MockObject Co-authored-by: Damien McKenna <[email protected]> * Replace deprecated RouteEnhancerInterface with EnhancerInterface Co-authored-by: Damien McKenna <[email protected]> * Remove deprecated PHPUnit_Framework_Error_Warning * Replace 'core: 8.x' with 'core_version_requirement: ^8.8 || ^9' * Replace deprecated entity.manager with entity_type.manager * Must enable the path_alias module in tests * Replace deprecated url() with createFileUrl(FALSE) * Assert menu is an object, rather than assert it is true * chore: adjust things mentioned in #1067 * chore: adjust info.yml files for test modules * chore: trigger travis build * chore: keep composer at version 1 Co-authored-by: Hugo van Kemenade <[email protected]> Co-authored-by: Damien McKenna <[email protected]>
Merged in #1102 and released in https://www.drupal.org/project/graphql/releases/8.x-3.1 🎈 |
Fixes #1011.
Based on, replaces and closes #1012 (with thanks to @damienmckenna).
Because the GraphQL v4 module isn't compatible with Drupal 8, contains breaking changes and requires a lot of rewriting, it will help the community to be able migrate to Drupal 9 sooner and by changing fewer things at each step.
Also, v4 is still in beta and therefore not covered by the security advisory policy, so may be not ready for production.
Once migrated to D9, users will be able to perform the v4 upgrade.
The tests pass on Travis CI for Drupal 8.8, 8.9 and 9.0.
Our D8.9 site's own unit tests pass with these changes.