Show HN: The GraphQL API for WordPress is transpiled from PHP 8.0 to 7.1(graphql-api.com)
graphql-api.com
Show HN: The GraphQL API for WordPress is transpiled from PHP 8.0 to 7.1
https://graphql-api.com/blog/the-plugin-is-now-transpiled-from-php-80-to-71/
7 comments
For the null-safe operator: I've not looked at PHP in years, but is that transpilation really correct? That is, does the original code really call getSchemaDefinitionResolver twice like the transpiled version does?
I don’t believe so, no. So for impure or non-idempotent methods, the two versions would not be equivalent.
Edit: it is indeed not the same https://3v4l.org/UNmAg
Edit: it is indeed not the same https://3v4l.org/UNmAg
This is more correct: https://3v4l.org/nAtYp
Note that the parens around the assignment are required to capture the assignment to `$result`.
Note that the parens around the assignment are required to capture the assignment to `$result`.
I opened a PR here: https://github.com/rectorphp/rector/pull/6101
That looks like what I was expecting. Nice work!