drupal-graphql / graphql-views

11 stars 18 forks source link

Drupal 9 compatibility #36

Closed freelock closed 3 years ago

freelock commented 4 years ago

Code report:

CONTRIBUTED PROJECTS

GraphQL Views 8.x-1.0 Scanned on Wed, 06/03/2020 - 23:52.

1 error found. 8 warnings found.

modules/contrib/graphql_views/src/Plugin/views/row/GraphQLEntityRow.php: ┌─────────┬──────┬──────────────────────────────────────────────────────────────┐ │ STATUS │ LINE │ MESSAGE │ ├─────────┼──────┼──────────────────────────────────────────────────────────────┤ │ Fix now │ 64 │ Parameter $entityManager of method │ │ │ │ Drupal\graphql_views\Plugin\views\row\GraphQLEntityRow::__co │ │ │ │ nstruct() has typehint with deprecated interface │ │ │ │ Drupal\Core\Entity\EntityManagerInterface. Deprecated in │ │ │ │ drupal:8.0.0 and is removed from drupal:9.0.0. │ │ │ │ │ └─────────┴──────┴──────────────────────────────────────────────────────────────┘

modules/contrib/graphql_views/tests/src/Kernel/ContextualViewsTest.php: ┌──────────┬──────┬───────────────────────────────────────────────────────────┐ │ STATUS │ LINE │ MESSAGE │ ├──────────┼──────┼───────────────────────────────────────────────────────────┤ │ Check │ │ Class Drupal\Tests\graphql_views\Kernel\ViewsTestBase not │ │ manually │ │ found and could not be autoloaded. │ │ │ │ │ │ Check │ 12 │ Class Drupal\Tests\graphql_views\Kernel\ViewsTestBase not │ │ manually │ │ found and could not be autoloaded. │ │ │ │ │ └──────────┴──────┴───────────────────────────────────────────────────────────┘

modules/contrib/graphql_views/tests/src/Kernel/ViewsTest.php: ┌──────────┬──────┬───────────────────────────────────────────────────────────┐ │ STATUS │ LINE │ MESSAGE │ ├──────────┼──────┼───────────────────────────────────────────────────────────┤ │ Check │ │ Class Drupal\Tests\graphql_views\Kernel\ViewsTestBase not │ │ manually │ │ found and could not be autoloaded. │ │ │ │ │ │ Check │ 11 │ Class Drupal\Tests\graphql_views\Kernel\ViewsTestBase not │ │ manually │ │ found and could not be autoloaded. │ │ │ │ │ └──────────┴──────┴───────────────────────────────────────────────────────────┘

modules/contrib/graphql_views/tests/src/Kernel/ViewsTestBase.php: ┌──────────┬──────┬─────────────────────────────────────────────────────────────┐ │ STATUS │ LINE │ MESSAGE │ ├──────────┼──────┼─────────────────────────────────────────────────────────────┤ │ Check │ │ Class │ │ manually │ │ Drupal\Tests\graphql_core\Kernel\GraphQLContentTestBase not │ │ │ │ found and could not be autoloaded. │ │ │ │ │ │ Check │ 17 │ Class │ │ manually │ │ Drupal\Tests\graphql_core\Kernel\GraphQLContentTestBase not │ │ │ │ found and could not be autoloaded. │ │ │ │ │ └──────────┴──────┴─────────────────────────────────────────────────────────────┘

modules/contrib/graphql_views/graphql_views.info.yml: ┌──────────┬──────┬────────────────────────────────────────────────────────────┐ │ STATUS │ LINE │ MESSAGE │ ├──────────┼──────┼────────────────────────────────────────────────────────────┤ │ Check │ 0 │ Add core_version_requirement: ^8 || ^9 to │ │ manually │ │ modules/contrib/graphql_views/graphql_views.info.yml to │ │ │ │ designate that the module is compatible with Drupal 9. See │ │ │ │ https://drupal.org/node/3070687. │ │ │ │ │ └──────────┴──────┴────────────────────────────────────────────────────────────┘

modules/contrib/graphql_views/tests/modules/graphql_views_test/graphql_views_tes t.info.yml: ┌──────────┬──────┬──────────────────────────────────────────────────────────────┐ │ STATUS │ LINE │ MESSAGE │ ├──────────┼──────┼──────────────────────────────────────────────────────────────┤ │ Check │ 0 │ Add core_version_requirement: ^8 || ^9 to │ │ manually │ │ modules/contrib/graphql_views/tests/modules/graphql_views_te │ │ │ │ st/graphql_views_test.info.yml to designate that the module │ │ │ │ is compatible with Drupal 9. See │ │ │ │ https://drupal.org/node/3070687. │ │ │ │ │ └──────────┴──────┴──────────────────────────────────────────────────────────────┘

widmerin commented 3 years ago

I get the following errors when I use GraphQL Views with the Drupal 9 compatibility patch and Drupal 9.1.4:

Call to undefined method Drupal\graphql_views\Plugin\views\row\GraphQLEntityRow::getEntityTypeManager()

and

Call to undefined method Drupal\graphql_views\Plugin\views\row\GraphQLEntityRow::getEntityRepository()

I wrote a patch to implement the EntityTypeManager and EntityRepository for GraphQLEntityRow. Should I upload it in a separate issue or add it to the Drupal 9 branch? Sorry, I'm not sure how the workflow works in this project.

williambe commented 3 years ago

I get the following errors when I use GraphQL Views with the Drupal 9 compatibility patch and Drupal 9.1.4:

Call to undefined method Drupal\graphql_views\Plugin\views\row\GraphQLEntityRow::getEntityTypeManager()

and

Call to undefined method Drupal\graphql_views\Plugin\views\row\GraphQLEntityRow::getEntityRepository()

I wrote a patch to implement the EntityTypeManager and EntityRepository for GraphQLEntityRow. Should I upload it in a separate issue or add it to the Drupal 9 branch? Sorry, I'm not sure how the workflow works in this project.

Hi widmerin, I'm not an expert in Drupal contribution workflow, but I think that the official repository of this project is now https://git.drupalcode.org/project/graphql_views as stated in project version control instruction page. I suspect that none of the PR in this former Github repository is being taken into consideration by the maintainers.

I am getting the same errors as you and would love to test your patch. Could you share it?

PS. https://www.drupal.org/docs/develop/git/using-git-to-contribute-to-drupal/creating-issue-forks-and-merge-requests

widmerin commented 3 years ago

Since graphql_views does not use the default Drupal contribution workflow, I have not found out how to contribute the patch. I'll upload the patch as an attachment for now, so you can include it as a local patch if you like.

graphql_view_drupal9_fix_entity_manager.patch.zip

williambe commented 3 years ago

Thanks @widemerin, your patch on the @dan2k3k4 fork (dan2k3k4/graphql-views) is working for me on Drupal 9.1.4. I'm asking on Slack how your contributions can be shared on project page. I'd like to ask project maintainers to activate at least the project issue queue.

dan2k3k4 commented 3 years ago

Thanks @widmerin, I've updated my PR to include your patch: 6cb5665 (#39)

I don't have access to merge in this repo.