Re: [PHP-DEV] Generating arginfo from stub files

2019-06-18 Thread G. P. B.
On Tue, 18 Jun 2019 at 20:37, Mark Randall wrote: > On 18/06/2019 18:53, Nikita Popov wrote: > > This is not really possible, because we need completely accurate type > > information. phpstorm-stubs is a good approximation especially when it > > comes to "useful" return types, but it doesn't mod

Re: [PHP-DEV] Generating arginfo from stub files

2019-06-18 Thread Mark Randall
On 18/06/2019 18:53, Nikita Popov wrote: This is not really possible, because we need completely accurate type information. phpstorm-stubs is a good approximation especially when it comes to "useful" return types, but it doesn't model things like possible "false" return values with sufficient acc

Re: [PHP-DEV] Generating arginfo from stub files

2019-06-18 Thread Nikita Popov
On Tue, Jun 18, 2019 at 7:38 PM Rowan Collins wrote: > Hi Nikita, > > On Tue, 18 Jun 2019 at 16:10, Nikita Popov wrote: > >> I've created a proof of concept implementation for this at >> https://github.com/php/php-src/pull/4284. Function signatures are >> specified >> in a xyz.stub.php file from

Re: [PHP-DEV] Generating arginfo from stub files

2019-06-18 Thread Rowan Collins
Hi Nikita, On Tue, 18 Jun 2019 at 16:10, Nikita Popov wrote: > I've created a proof of concept implementation for this at > https://github.com/php/php-src/pull/4284. Function signatures are > specified > in a xyz.stub.php file from which xyz_arginfo.h is generated. This file can > then be includ

Re: [PHP-DEV] Generating arginfo from stub files

2019-06-18 Thread Benjamin Morel
> > But also, it's really a shame we don't have the union types RFC passed > yet, as it means that the return type for a significant number of > functions will be either incomplete or misleading. > > Agreed.

Re: [PHP-DEV] Generating arginfo from stub files

2019-06-18 Thread Dan Ackroyd
On Tue, 18 Jun 2019 at 16:10, Nikita Popov wrote: > Rather than writing this out by hand, I would like arginfo structures to be > generated from PHP stub files that contain definitions like this: > > What do you think about providing this mechanism? Sounds good. But also, it's really a shame we