Re: [PHP-DEV] [RFC] Access to aliases definition by reflection

2014-10-13 Thread Miloslav Hůla
Dne 13.10.2014 16:12, Andrea Faulds napsal(a): 1. I think you should also support function aliases here. Constants too would be good, but I’m not sure if they’re actually implemented as aliases (they might just be copies). The function and constant aliasing is a quite new PHP feature. I don't

Re: [PHP-DEV] [RFC] Access to aliases definition by reflection

2014-10-13 Thread Miloslav Hůla
Dne 13.10.2014 16:09, Dan Ackroyd napsal(a): Wouldn't this RFC be almost instantly deprecated if the Return Type Declarations RFC ( https://wiki.php.net/rfc/returntypehinting ) is accepted? The Return Type Declarations RFC solves problem partially. Aliases expanding is needed for many other an

Re: [PHP-DEV] [RFC] Access to aliases definition by reflection

2014-10-13 Thread Nikita Popov
On Mon, Oct 13, 2014 at 4:21 PM, Andrea Faulds wrote: > > On 13 Oct 2014, at 15:14, Marco Pivetta wrote: > > > On 13 October 2014 16:12, Andrea Faulds wrote: > > 2. Shouldn’t it return fully-qualified class names beginning with a > backslash? > > > > When in string context, we are typically alw

Re: [PHP-DEV] [RFC] Access to aliases definition by reflection

2014-10-13 Thread Nikita Popov
On Mon, Oct 13, 2014 at 3:46 PM, Alexander Lisachenko < lisachenko...@gmail.com> wrote: > Hello! > > > I've written an RFC which proposes to expose a namespace aliases/imports > for > > user-land code. > > > > https://wiki.php.net/rfc/aliases_by_reflection > > I think that this idea is good, howev

Re: [PHP-DEV] [RFC] Access to aliases definition by reflection

2014-10-13 Thread Andrea Faulds
On 13 Oct 2014, at 15:14, Marco Pivetta wrote: > On 13 October 2014 16:12, Andrea Faulds wrote: > 2. Shouldn’t it return fully-qualified class names beginning with a backslash? > > When in string context, we are typically always talking about FQCNs, so the > leading backslash is not needed an

Re: [PHP-DEV] [RFC] Access to aliases definition by reflection

2014-10-13 Thread Marco Pivetta
On 13 October 2014 16:12, Andrea Faulds wrote: > 2. Shouldn’t it return fully-qualified class names beginning with a > backslash? > When in string context, we are typically always talking about FQCNs, so the leading backslash is not needed and should be omitted. Marco Pivetta http://twitter.co

Re: [PHP-DEV] [RFC] Access to aliases definition by reflection

2014-10-13 Thread Andrea Faulds
On 13 Oct 2014, at 13:55, Miloslav Hůla wrote: > I've written an RFC which proposes to expose a namespace aliases/imports for > user-land code. > > https://wiki.php.net/rfc/aliases_by_reflection Looks good, but: 1. I think you should also support function aliases here. Constants too would b

Re: [PHP-DEV] [RFC] Access to aliases definition by reflection

2014-10-13 Thread Dan Ackroyd
Hi, Wouldn't this RFC be almost instantly deprecated if the Return Type Declarations RFC ( https://wiki.php.net/rfc/returntypehinting ) is accepted? cheers Dan -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] [RFC] Access to aliases definition by reflection

2014-10-13 Thread Alexander Lisachenko
Hello! > I've written an RFC which proposes to expose a namespace aliases/imports for > user-land code. > > https://wiki.php.net/rfc/aliases_by_reflection I think that this idea is good, however it isn't correct to keep aliases per each class, because they are applied per scope. TokenReflection l

[PHP-DEV] [RFC] Access to aliases definition by reflection

2014-10-13 Thread Miloslav Hůla
Good afternoon, I've written an RFC which proposes to expose a namespace aliases/imports for user-land code. https://wiki.php.net/rfc/aliases_by_reflection I would like to ask you to open a discussion. Kind regards, Milo -- Miloslav Hůla -- PHP Internals - PHP Runtime Development Mailing L