Skip to content
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

Variadic params should always be optional and fix redundant optional variadic annotation #10777

Open
wants to merge 15 commits into
base: 5.x
Choose a base branch
from

Conversation

kkmuffme
Copy link
Contributor

@kkmuffme kkmuffme commented Mar 3, 2024

@kkmuffme kkmuffme force-pushed the variadic-params-should-always-be-optional-and-fix-redundant-optional-variadic-annotation branch from cd6937c to d45dc75 Compare March 12, 2024 19:46
@kkmuffme kkmuffme force-pushed the variadic-params-should-always-be-optional-and-fix-redundant-optional-variadic-annotation branch from d45dc75 to 4436c1a Compare March 12, 2024 19:52
@kkmuffme kkmuffme force-pushed the variadic-params-should-always-be-optional-and-fix-redundant-optional-variadic-annotation branch 4 times, most recently from 2ba1d63 to 89e9a61 Compare March 12, 2024 21:10
@kkmuffme kkmuffme force-pushed the variadic-params-should-always-be-optional-and-fix-redundant-optional-variadic-annotation branch from 89e9a61 to 26ed6d8 Compare March 12, 2024 21:31
@kkmuffme kkmuffme force-pushed the variadic-params-should-always-be-optional-and-fix-redundant-optional-variadic-annotation branch from 26ed6d8 to 03bde5e Compare March 12, 2024 21:38
@kkmuffme kkmuffme marked this pull request as ready for review March 12, 2024 21:44
@kkmuffme
Copy link
Contributor Author

kkmuffme commented Mar 12, 2024

@weirdan review and merge please

@weirdan
Copy link
Collaborator

weirdan commented Mar 20, 2024

@kkmuffme
Copy link
Contributor Author

Went through them quickly and they're all correct in terms of that we cannot be certain that there's not a bug hidden.
Is it annoying when using spread operator? Definitely yes. However practically, the spread operator was an escape hatch for strict type checking and the fix is often quite simple (set actual array keys as int if you only accept int arrays, use non-empty-array type) but the impact rather big (since those would be fatal errors in many cases)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants