3 ms·
Show HN: The GraphQL API for WordPress is transpiled from PHP 8.0 to 7.1
- brian_herman 6y agoNice job!
- leoloso 6y agoThanks!
- hvdijk 6y agoFor 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?
- deergomoo 6y agoI 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 https://3v4l.org/UNmAg
- withinboredom 6y agoThis is more correct: https://3v4l.org/nAtYp https://3v4l.org/nAtYp Note that the parens around the assignment are required to capture the assignment to `$result`.
- withinboredom 6y agoI opened a PR here: https://github.com/rectorphp/rector/pull/6101 https://github.com/rectorphp/rector/pull/6101
- hvdijk 6y agoThat looks like what I was expecting. Nice work!