Re: [PHP-DEV] [RFC][DISCUSSION] ReflectionParameter::getClassName()

2015-03-16 Thread Matteo Beccati
Hi everyone, I know it's late for the RFC party, but it looks like some form of STH is going to land in PHP7. Without reflection support, which is also missing from return types as far as I know. That's why I'm resuming this thread, as I still think this is the best approach. Many do not lik

RE: [PHP-DEV] [RFC][DISCUSSION] ReflectionParameter::getClassName()

2015-02-15 Thread François Laupretre
> De : Matteo Beccati [mailto:p...@beccati.com] > > The new methods are: > > * ReflectionFunctionAbstract::hasReturnTypeAnnotation() > * ReflectionFunctionAbstract::getReturnTypeAnnotation() > * ReflectionTypeAnnotation::isInstance() I agree Reflection must support hinting but annotations, int th

Re: [PHP-DEV] [RFC][DISCUSSION] ReflectionParameter::getClassName()

2015-02-15 Thread Matteo Beccati
Hi, On 14/02/2015 21:23, Matteo Beccati wrote: On 14/02/2015 16:34, Philip Sturgeon wrote: On Sat, Jan 31, 2015 at 8:27 PM, Andrea Faulds wrote: I think the more important issue is the conflict with the ReflectionTypeAnnotation RFC, which proposes something similar to what was originally part

Re: [PHP-DEV] [RFC][DISCUSSION] ReflectionParameter::getClassName()

2015-02-14 Thread Matteo Beccati
On 14/02/2015 16:34, Philip Sturgeon wrote: On Sat, Jan 31, 2015 at 8:27 PM, Andrea Faulds wrote: I think the more important issue is the conflict with the ReflectionTypeAnnotation RFC, which proposes something similar to what was originally part of the Return Types RFC: https://wiki.php.net/r

Re: [PHP-DEV] [RFC][DISCUSSION] ReflectionParameter::getClassName()

2015-02-14 Thread Philip Sturgeon
On Sat, Jan 31, 2015 at 8:27 PM, Andrea Faulds wrote: > >> On 1 Feb 2015, at 01:23, Dan Ackroyd wrote: >> >> On 31 January 2015 at 17:31, Philip Sturgeon wrote: >>> On Sat, Jan 31, 2015 at 3:12 AM, Matteo Beccati wrote: 2) There's a tiny bit of overlap with "scalar type hints", >>> >>

Re: [PHP-DEV] [RFC][DISCUSSION] ReflectionParameter::getClassName()

2015-01-31 Thread Andrea Faulds
> On 1 Feb 2015, at 01:23, Dan Ackroyd wrote: > > On 31 January 2015 at 17:31, Philip Sturgeon wrote: >> On Sat, Jan 31, 2015 at 3:12 AM, Matteo Beccati wrote: >>> >>> 2) There's a tiny bit of overlap with "scalar type hints", >> >> 2) There might be some overlap in the scalar type hint stuf

Re: [PHP-DEV] [RFC][DISCUSSION] ReflectionParameter::getClassName()

2015-01-31 Thread Dan Ackroyd
On 31 January 2015 at 17:31, Philip Sturgeon wrote: > On Sat, Jan 31, 2015 at 3:12 AM, Matteo Beccati wrote: >> >> 2) There's a tiny bit of overlap with "scalar type hints", > > 2) There might be some overlap in the scalar type hint stuff kinda, > but I'd like to think there isn't. getClassName()

Re: [PHP-DEV] [RFC][DISCUSSION] ReflectionParameter::getClassName()

2015-01-31 Thread Philip Sturgeon
On Sat, Jan 31, 2015 at 3:12 AM, Matteo Beccati wrote: > Hi Phil, > > > On 31/01/2015 05:14, Philip Sturgeon wrote: >> >> This RFC adds a new method to ReflectionParameter to allow easy access >> to a class name in a type hint, avoiding the need to actually load the >> class and use `get_class()`

Re: [PHP-DEV] [RFC][DISCUSSION] ReflectionParameter::getClassName()

2015-01-31 Thread Matteo Beccati
Hi Phil, On 31/01/2015 05:14, Philip Sturgeon wrote: This RFC adds a new method to ReflectionParameter to allow easy access to a class name in a type hint, avoiding the need to actually load the class and use `get_class()` or `::class`. https://wiki.php.net/rfc/reflectionparameter-getclassname

[PHP-DEV] [RFC][DISCUSSION] ReflectionParameter::getClassName()

2015-01-30 Thread Philip Sturgeon
This RFC adds a new method to ReflectionParameter to allow easy access to a class name in a type hint, avoiding the need to actually load the class and use `get_class()` or `::class`. https://wiki.php.net/rfc/reflectionparameter-getclassname Cheers. -- PHP Internals - PHP Runtime Development Ma