-
Notifications
You must be signed in to change notification settings - Fork 177
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): Support literal types #5991
Conversation
Discussed offline w/ @ajgateno - with the amount of one-off handling we need to accommodate setting literals under the hood, this feels bug prone and easy to mess up. To start, we'll take on a design similar to the literal experience in TypeScript - strongly type each call-site in PHPDoc comments, but still require the user to specify them by hand in the constructor. We can always improve this experience later on if there's enough reason to, but this feels like the right middle ground to start. |
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.
Few nits + updates in the error messages we throw.
seed/php-sdk/unions/no-custom-config/src/Types/Types/UnionWithLiteral.php
Outdated
Show resolved
Hide resolved
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.
Looks good - some of the large unions have really large PHPDoc comments, but it feels safer to start in the more strict manner, and relax that requirement later on (if ever).
No description provided.