RFC for @template annotation
Open
@TysonAndre is already working on this.
Since Jun 22, 2018.
difficult
RFC
- Dominant language
- PHP
- Stars
- 5.6k
- Forks
- 365
- Avg merge
- 1h 25m
- Merged PRs (30d)
- 6
Description
Given that generics aren't coming to PHP anytime soon, I wondered whether it'd be good to formalise @template so that other static analysis tools can use it, and also that we might show the benefits of generic patterns to the type system.
I have an implementation of it in latest Psalm master, mostly hewing to your implementation but adding a couple of extra bells and whistles (some ideas borrowed from Hack) in order to support generic traversables and function-level templating.
I'd be happy to put together an RFC expanding on your wiki page.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.