Open Fleshgrinder opened 9 years ago
Thanks for the kind words!
I would certainly love to see some of these ideas integrated into the PHPDoc PSR. I haven't been keeping up with the draft, but at a glance it looks like there are some cool new additions (like generics).
Is there a particular part of the Typhax spec which interests you, or that you feel the PHPDoc PSR does not cover?
So I had time to have a read of the Types section of the PSR, and these are the features in Typhax that I could not find equivalents for:
tuple
typestream
typestringable
type+
operator for typesresource{ofType:stream}
My workmates and I have been using Typhax every day for years, and of these features, we use the tuple
type and sequential arrays a lot, the stringable
type a little, the stream
type rarely, and the rest almost never.
I guess I'll attempt to open some issues for these points, and hopefully they get some support. It would be nice to touch base with the RFC creator first though, I don't want to flood their issue tracker :wink:
The first thing that is actually super simple (and probably super hard to get into the RFC) but that I liked a lot is discouraging the usage of short type aliases like int
and bool
.
That aside, I think that you know best what stuff is really useful. I never had the possibility to use Typhax in a real world project, just found it and thought that it includes some great ideas that should be spread to a broader audience.
@mvriel is mainly responsible for the PSR, as far as I know, but very busy these days. I'd suggest that you actually create as many issues as it requires, because there are some other people involved who might want to comment on them (but who cannot decide anything).
Oh, and you could support me on phpDocumentor/fig-standards#106 because you also defined that short class names (from use) are allowed. Something that is imho very important but currently not supported in the PSR.
See phpDocumentor/fig-standards#115 for the tuple
type PR.
See phpDocumentor/fig-standards#116 for the stream
type PR.
See phpDocumentor/fig-standards#117 for the stringable
type PR.
Awesome, thanks so much!
Hey guys, I like what you created here and I think that this would highly benefit the upcoming PSR for PHPDoc. Your contributions would result in a widespread support from tools and IDEs in the future.
https://github.com/phpDocumentor/fig-standards