Thanks to visit codestin.com
Credit goes to github.com

Skip to content

update to webonyx/graphql-php:^14.9.0 #327

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

Merged
merged 7 commits into from
Oct 13, 2021

Conversation

xyng
Copy link
Contributor

@xyng xyng commented Feb 2, 2021

This PR updates webonyx/graphql-php to the latest versions.
Psalm seems to be happy with the changes.
phpunit dies at the same spot as it does on master.
My project using graphqlite works perfectly fine.

If you have any feedback i'm happy to adjust the pr.

@devmaslov
Copy link
Collaborator

Hey @xyng,
Thanks for your PR, it's a good start!

Webonyx has changed signature for some of the class constructors and methods, that's why the unit tests are failing. For example \GraphQL\Error\Error constructor now excepts only array as the 4th parameter for $positions, while previously it was possible to pass null value.

I've prepared the update with the latest changes from master, newer version of webonyx/graphql and fixed unit tests. If you allow me I'll push the changes to your branch.

@xyng
Copy link
Contributor Author

xyng commented Apr 5, 2021

Hey @devmaslov,

sorry for the delay before responding!

You're very welcome in pushing these changes onto this branch :-)

@codecov-io
Copy link

Codecov Report

Merging #327 (9970c28) into master (8f8f6be) will decrease coverage by 1.17%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #327      +/-   ##
============================================
- Coverage     98.30%   97.12%   -1.18%     
+ Complexity     1778     1578     -200     
============================================
  Files           147      144       -3     
  Lines          4125     4072      -53     
============================================
- Hits           4055     3955     -100     
- Misses           70      117      +47     
Impacted Files Coverage Δ Complexity Δ
src/Mappers/Root/BaseTypeMapper.php 100.00% <ø> (ø) 28.00 <0.00> (-2.00)
src/Http/Psr15GraphQLMiddlewareBuilder.php 100.00% <100.00%> (ø) 14.00 <0.00> (ø)
src/Http/WebonyxGraphqlMiddleware.php 100.00% <100.00%> (ø) 28.00 <0.00> (-1.00)
src/Mappers/Proxys/MutableObjectTypeAdapter.php 100.00% <100.00%> (ø) 4.00 <2.00> (-1.00)
src/AnnotationReader.php 77.83% <0.00%> (-17.25%) 78.00% <0.00%> (-7.00%)
src/Annotations/FailWith.php 87.50% <0.00%> (-12.50%) 5.00% <0.00%> (ø%)
src/Annotations/Right.php 88.88% <0.00%> (-11.12%) 5.00% <0.00%> (ø%)
src/Annotations/Decorate.php 88.88% <0.00%> (-11.12%) 5.00% <0.00%> (ø%)
src/Annotations/Security.php 89.28% <0.00%> (-10.72%) 16.00% <0.00%> (-3.00%)
src/Annotations/Autowire.php 92.30% <0.00%> (-7.70%) 6.00% <0.00%> (-1.00%)
... and 19 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8f8f6be...9970c28. Read the comment docs.

@devmaslov
Copy link
Collaborator

Thanks @xyng

Alright, tests are passing through and everything seems to work fine 😄
@moufmouf, @oojacoboo, what's our plan? Merge it and push live along side with #269 under version 5.0?

@devmaslov devmaslov linked an issue Apr 5, 2021 that may be closed by this pull request
@oojacoboo
Copy link
Collaborator

@devmaslov the plan is to release 4.2 with #269, as it doesn't have any breaking changes. Then, target a 5.0 release for this. Could you email me so we can have a thread for getting on the same page with these things among others (email on profile).

@aszenz
Copy link
Contributor

aszenz commented Aug 13, 2021

@devmaslov the plan is to release 4.2 with #269, as it doesn't have any breaking changes. Then, target a 5.0 release for this. Could you email me so we can have a thread for getting on the same page with these things among others (email on profile).

Is there a plan for merging this, I would be eager to help the migration in any way.
I see that the 4.2 version hasn't been released yet so just wondering if it's delayed because of that

@oojacoboo
Copy link
Collaborator

oojacoboo commented Aug 14, 2021

@aszenz @moufmouf has been sort of MIA. He's busy with a new project that's consuming most of his time and really hasn't been able to be attentive here. I don't think there is really much of a migration required for a new release. However, I was waiting on details regarding release requirements. I'm not familiar with how the docs are handled, for instance.

But, as far as a release goes, we should be able to tag a new release on master. I can give all this a go soon if @moufmouf doesn't chime in.

Updated: I meant @moufmouf not @devmaslov

@aszenz
Copy link
Contributor

aszenz commented Aug 16, 2021

@aszenz @devmaslov has been sort of MIA. He's busy with a new project that's consuming most of his time and really hasn't been able to be attentive here. I don't think there is really much of a migration required for a new release. However, I was waiting on details regarding release requirements. I'm not familiar with how the docs are handled, for instance.

But, as far as a release goes, we should be able to tag a new release on master. I can give all this a go soon if @devmaslov doesn't chime in.

Ok, I would like the release to go ahead.

One more thing, there are lots of people excited about graphql in symfony slack channel, maybe we should setup a channel there to collaborate on this wonderful library

@xyng
Copy link
Contributor Author

xyng commented Aug 17, 2021

Is there anything I could do to help you getting this merged? :-)

@oojacoboo
Copy link
Collaborator

@xyng the CI and checks have been cleaned up now and should be passing. They need to be re-run.

https://stackoverflow.com/questions/52408592/how-to-relaunch-github-check-without-pushing-new-commits/52412240

That should give us a better indication of issues with this PR.

@TamasSzigeti
Copy link
Contributor

Should be rebased onto master instead

@MartynasKasp
Copy link

Any updates on when this PR will be merged?

@oojacoboo
Copy link
Collaborator

@MartynasKasp we need all the tests passing before this can be merged in. Ping @xyng

@xyng
Copy link
Contributor Author

xyng commented Sep 28, 2021

I'll check the tests and try to resolve them in a few days.

I misread your comment from 2021-08-18 and thought you only wanted a merge from master. ;-)

@xyng xyng force-pushed the chore/update-graphql-php-14 branch from e733b60 to c934738 Compare September 28, 2021 07:49
@xyng
Copy link
Contributor Author

xyng commented Oct 2, 2021

So I did some debugging and changes. Tests are passing for me locally.
That being said, I'm unsure if the necessary changes are correct or break stuff.
I'd appreciate some feedback of people with deeper understanding of the code. :-)

* @throws AnnotationException
*/
public function getMiddlewareAnnotations($reflection): MiddlewareAnnotations
public function getMiddlewareAnnotations(ReflectionMethod|ReflectionProperty $reflection): MiddlewareAnnotations
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We still need to support php7 where this syntax is not available. Same below, mixed is a new feature too. Could you revert them all, please?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for that - I mostly run PHP 8 locally and it seems CodeSniffer figured typings would be better in the function definition.
Having reverted that change, the others also seem to have become obsolete.
I have force-pushed this branch to clean up the mess caused by that. So if you have pulled to review, please take that into account.

@xyng xyng force-pushed the chore/update-graphql-php-14 branch from 1554eca to a0df970 Compare October 2, 2021 18:25
@xyng
Copy link
Contributor Author

xyng commented Oct 4, 2021

The CI for a0df970 probably failed because composer pulled the lowest possible version, where as my local composer install did fetch the latest 14.9.0.
Could you please approve the workflows to run for e276fb3?

@xyng xyng changed the title update to webonyx/graphql-php:^14.5.0 update to webonyx/graphql-php:^14.9.0 Oct 4, 2021
@dsavina
Copy link
Contributor

dsavina commented Oct 7, 2021

I created this merge request to your branch, if it's okay with you, it seems to be working alright, and it feels less like a horrible hack than my previous proposal.

@xyng
Copy link
Contributor Author

xyng commented Oct 7, 2021

I'm a little confused that tests fail here as they did pass locally.
But you're right - findField seems to not always get types right.

I'm happy with your pull-request however I'd prefer approval for that additional change of a contributor of this project before merging that into this pr and eventually cluttering it.
(I could not find you in the contributors-list so I assume you are just another random person like me :-))

@dsavina
Copy link
Contributor

dsavina commented Oct 7, 2021

I actually work at TheCodingMachine, but only just took my first dive into graphqlite. @moufmouf, can you take a look at these changes I proposed?

@moufmouf
Copy link
Member

moufmouf commented Oct 8, 2021

I'm happy with your pull-request however I'd prefer approval for that additional change of a contributor of this project before merging that into this pr and eventually cluttering it.

Hey @xyng! First of all, thanks a lot for this PR, it's great!
I think you can safely merge @dsavina PR into your PR. It looks good to me and it should help tests to pass!

@xyng
Copy link
Contributor Author

xyng commented Oct 11, 2021

Hey @dsavina I just merged your changes.
Could you (or someone else with permissions) maybe approve the workflow run?

@moufmouf
Copy link
Member

@xyng Done!

@dsavina
Copy link
Contributor

dsavina commented Oct 11, 2021

Documentation generation failed, however I can see that running this job on pull requests is only recent.

@oojacoboo, did we miss something?

@aszenz
Copy link
Contributor

aszenz commented Oct 11, 2021

It seems like there was a permission error for doc generation action:

remote: Permission to thecodingmachine/graphqlite.git denied to github-actions[bot].
fatal: unable to access 'https://github.com/thecodingmachine/graphqlite.git/': The requested URL returned error: 403

@dsavina
Copy link
Contributor

dsavina commented Oct 11, 2021

I don't get why this push was attempted in the first place: this is only a pull request, shouldn't the documentation be deployed only after this is merged?

@dsavina
Copy link
Contributor

dsavina commented Oct 11, 2021

As discussed with @moufmouf, this PR is ready to merge.

I've created #394 to fix the documentation deployment issue, which can simply be ignored here (at least we know that the build of the documentation succeeded).

@modestguy
Copy link

Hello everyone. Any news? Any suggestions when the release will be? Thanks for your work!

@xyng xyng force-pushed the chore/update-graphql-php-14 branch from bdaa844 to 8e99d7a Compare October 13, 2021 06:51
@xyng
Copy link
Contributor Author

xyng commented Oct 13, 2021

I noticed that #394 got merged and rebased this pr to the updated master.
Could someone please approve the workflow-run (it won't run automatically as I am a first-time contributor), so we can see if they pass now? :-)

@moufmouf
Copy link
Member

@xyng Done!

@moufmouf
Copy link
Member

Excellent! Before we merge this, shouldn't we consider upgrading the version alias in Composer?

https://github.com/thecodingmachine/graphqlite/blob/master/composer.json#L66-L70

A lot of projects must be depending on webonyx to be in 0.13 without properly stating this dependency in their composer.json (because it is a transititive dependency via GraphQLite). Should we upgrade the version number to 5.x ?

xyng added a commit to xyng/graphqlite that referenced this pull request Oct 13, 2021
@xyng
Copy link
Contributor Author

xyng commented Oct 13, 2021

@moufmouf I set the version to 5.0.0 - if you decide against setting this in this pr I can remove the commit.

Edit: Sorry I got the file wrong :-) I've changed the commit so it updates the branch-alias.

@xyng xyng force-pushed the chore/update-graphql-php-14 branch from 782bd3b to 23c0cdf Compare October 13, 2021 09:17
@moufmouf
Copy link
Member

Looks good to me!
Let's merge this 👍

@moufmouf moufmouf merged commit 5b1ea87 into thecodingmachine:master Oct 13, 2021
@xyng xyng deleted the chore/update-graphql-php-14 branch October 13, 2021 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Plan migration to Webonyx 14
10 participants