-
Notifications
You must be signed in to change notification settings - Fork 151
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
feat(php): use strings for request enums + other small fixes #4741
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, only a few nits + suggestions!
new ClassReference({ | ||
name: "JsonSerializable", | ||
namespace: "" | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: We should make this a function on the abstract context, so we can just read:
writer.addReference(this.context.getJsonSerializableClassReference())
Check out getJsonExceptionClassReference for an example.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we don't have context
in Ast classes though right?
/* | ||
* By default, we represent enums as strings, with a phpstan phpdoc referencing the generated enum. If this flag is | ||
* is true, then we reference the enum type directly. | ||
*/ | ||
preserveEnums?: boolean; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this still used? I don't see anywhere that sets it to true
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nope not anymore! ok if we leave it around in case, or you want it gone?
Co-authored-by: Alex McKinney <[email protected]>
changelog:
also: