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

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 a...@ajf.me wrote: I think the more important issue is the conflict with the ReflectionTypeAnnotation RFC, which proposes something similar to what was

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 the PHP

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

2015-02-14 Thread Philip Sturgeon
On Sat, Jan 31, 2015 at 8:27 PM, Andrea Faulds a...@ajf.me wrote: On 1 Feb 2015, at 01:23, Dan Ackroyd dan...@basereality.com wrote: On 31 January 2015 at 17:31, Philip Sturgeon pjsturg...@gmail.com wrote: On Sat, Jan 31, 2015 at 3:12 AM, Matteo Beccati p...@beccati.com wrote: 2) There's a

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 a...@ajf.me 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:

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

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

2015-01-31 Thread Philip Sturgeon
On Sat, Jan 31, 2015 at 3:12 AM, Matteo Beccati p...@beccati.com 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

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

2015-01-31 Thread Dan Ackroyd
On 31 January 2015 at 17:31, Philip Sturgeon pjsturg...@gmail.com wrote: On Sat, Jan 31, 2015 at 3:12 AM, Matteo Beccati p...@beccati.com 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

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

2015-01-31 Thread Andrea Faulds
On 1 Feb 2015, at 01:23, Dan Ackroyd dan...@basereality.com wrote: On 31 January 2015 at 17:31, Philip Sturgeon pjsturg...@gmail.com wrote: On Sat, Jan 31, 2015 at 3:12 AM, Matteo Beccati p...@beccati.com wrote: 2) There's a tiny bit of overlap with scalar type hints, 2) There might be