quicktype
quicktype copied to clipboard
add php support
I built for me working php language adapter. There a still some thing todo like Date/Time/UUID Type support. But I hope it's a nice starting point. To the php language support.
cheers
meno
@mabels Thank you so much! Would you mind rebasing your PR onto the latest master
? The one you were working on unfortunately doesn't build anymore, but it got fixed in the mean time.
I will rebase it, again.
Meno
On Fri, Dec 25, 2020 at 7:39 PM Mark Probst [email protected] wrote:
@mabels https://github.com/mabels Thank you so much! Would you mind rebasing your PR onto the latest master? The one you were working on unfortunately doesn't build anymore, but it got fixed in the mean time.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/quicktype/quicktype/pull/1595#issuecomment-751280511, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAEWJU5YIMWWXPEXT5LXTDSWTL4NANCNFSM4UD7H2SA .
Hi,
i just updated all so the php stuff is ready for rebase on your side. TODO: add php to your test enviroment:
require_once("./doof.php");
$json1 = json_encode(Purchase::sample()->to());
$json2 = json_encode(Purchase::from(json_decode($json1))->to());
if ($json1 == $json2) {
echo "all good";
} else {
echo($json1);
echo($json2);
}
@mabels I added test fixture for PHP here (I couldn't push to your branch, so had to make an independent PR, but feel free to just take whatever you want from there and I'll close mine again): https://github.com/quicktype/quicktype/pull/1616
Unfortunately almost all tests fail. I don't know any PHP, so I have no idea whether it's because of my PHP setup, or because the generated code is incorrect, or some other reason. You can run the tests with
npm run build && FIXTURE=php npm run test
Hi, i stepped yesterday in the tests of quicktype and discovered there are "some" things to do. I will continue the php work in the next days.
sorry
meno
On Sun, Dec 27, 2020 at 12:56 AM Mark Probst [email protected] wrote:
@mabels https://github.com/mabels I added test fixture for PHP here (I couldn't push to your branch, so had to make an independent PR, but feel free to just take whatever you want from there and I'll close mine again): #1616 https://github.com/quicktype/quicktype/pull/1616
Unfortunately almost all tests fail. I don't know any PHP, so I have no idea whether it's because of my PHP setup, or because the generated code is incorrect, or some other reason. You can run the tests with
npm run build && FIXTURE=php npm run test
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/quicktype/quicktype/pull/1595#issuecomment-751408448, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAEWJVHRAWURDFFWD3OF63SWZZ3DANCNFSM4UD7H2SA .
Thank you so much!
@mabels We got three type check errors:
ERROR: /app/src/quicktype-core/language/Php.ts:795:17 - This type is not allowed in the condition because it could be undefined. Only booleans are allowed.
| ERROR: /app/src/quicktype-core/language/Php.ts:797:17 - This type is not allowed in the 'if' condition because it could be undefined. Only booleans are allowed.
| ERROR: /app/src/quicktype-core/language/Php.ts:894:21 - This type is not allowed in the 'if' condition because it could be undefined. Only booleans are allowed.
@mabels Any news on this?
i'm still fighting with all tests. There are some issues with currently with union's. I'm just got back to work today and will hopefully find some time this week
cheers
meno
On Sun, Jan 10, 2021 at 1:58 AM Mark Probst [email protected] wrote:
@mabels https://github.com/mabels Any news on this?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/quicktype/quicktype/pull/1595#issuecomment-757392871, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAEWJSWO6UCO44K7FFTMQTSZD3UHANCNFSM4UD7H2SA .
Can I help with anything?
Hello, how is the state here? I would like to help, but I'm a complete beginner. Does this relate to #1616 ?
Should the work done by @schani in https://github.com/quicktype/quicktype/pull/1616 be merged in this PR?
Any progress? What's up?
Superseded by #1616