[PHP-DEV] Re: [VOTE] Deprecate and remove case-insensitive constants

2019-02-11 Thread Christoph M. Becker
On 08.02.2019 at 09:59, Nikita Popov wrote:

> On Thu, Feb 7, 2019 at 11:31 PM Christoph M. Becker 
> wrote:
> 
>> I just learned that com_load_typelib()[1] automatically registers enum
>> members as constants, and allows to register them as case-insensitive
>> (the default is case-sensitive, despite the documentation, which I'm
>> going to fix right away).  If a typelib is implicitly loaded,
>> com.autoregister_casesensitive[2] controls whether constants are
>> registered case-sensitively or not.  It seems to me com_load_typelib()
>> should trigger a deprecation warning, if FALSE is passed as second
>> argument, and also disabling com.autoregister_casesensitive should.
>>
>> Can this be amemded for PHP 7.3.3, or are there any objections?
>>
>> [1] 
>> [2]
>> <
>> http://php.net/manual/en/com.configuration.php#ini.com.autoregister-casesensitive
> 
> Thanks for pointing this out! Agree that both of those should be deprecated
>  in fact the necessary for code handling case-insensitive constants is
> already gone in master, so they'll definitely have to go as well.
> 
> Personally I think it would be best to add the deprecations in 7.4, as
> there's no particular rush and we usually don't add deprecations in patch
> releases. I don't have a problem with them being added in 7.3.3 either
> though, this is not exactly prime functionality and we're early in the
> release cycle...

Postponing this to 7.4 is fine for me.  I'll provide a respective PR
within the next days.

-- 
Christoph M. Becker

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DEV] Re: [VOTE] Deprecate and remove case-insensitive constants

2019-02-08 Thread Nikita Popov
On Thu, Feb 7, 2019 at 11:31 PM Christoph M. Becker 
wrote:

> On 16.07.2018 at 19:00, Nikita Popov wrote:
>
> > On Mon, Jul 9, 2018 at 10:36 AM, Nikita Popov 
> wrote:
> >
> >> I would like to open the vote on the RFC for the deprecation (in PHP
> 7.3)
> >> and removal (in PHP 8.0) of case-insensitive constants.
> >>
> >> https://wiki.php.net/rfc/case_insensitive_constant_deprecation
> >>
> >> If you missed the discussion for this RFC, you can read up on it here:
> >>
> >> https://externals.io/message/102389
> >>
> >> As this is a language change, the vote requires a 2/3 supermajority. The
> >> vote will be open until 2018-07-09.
> >>
> >
> > I'm happy to announce that this RFC has been accepted unanimously with 39
> > votes in favor and 0 against.
>
> I just learned that com_load_typelib()[1] automatically registers enum
> members as constants, and allows to register them as case-insensitive
> (the default is case-sensitive, despite the documentation, which I'm
> going to fix right away).  If a typelib is implicitly loaded,
> com.autoregister_casesensitive[2] controls whether constants are
> registered case-sensitively or not.  It seems to me com_load_typelib()
> should trigger a deprecation warning, if FALSE is passed as second
> argument, and also disabling com.autoregister_casesensitive should.
>
> Can this be amemded for PHP 7.3.3, or are there any objections?
>
> [1] 
> [2]
> <
> http://php.net/manual/en/com.configuration.php#ini.com.autoregister-casesensitive
> >
>

Thanks for pointing this out! Agree that both of those should be deprecated
... in fact the necessary for code handling case-insensitive constants is
already gone in master, so they'll definitely have to go as well.

Personally I think it would be best to add the deprecations in 7.4, as
there's no particular rush and we usually don't add deprecations in patch
releases. I don't have a problem with them being added in 7.3.3 either
though, this is not exactly prime functionality and we're early in the
release cycle...

Nikita


[PHP-DEV] Re: [VOTE] Deprecate and remove case-insensitive constants

2018-07-17 Thread Christoph M. Becker
On 16.07.2018 at 19:00, Nikita Popov wrote:

> On Mon, Jul 9, 2018 at 10:36 AM, Nikita Popov  wrote:
> 
>> https://wiki.php.net/rfc/case_insensitive_constant_deprecation
> 
> I'm happy to announce that this RFC has been accepted unanimously with 39
> votes in favor and 0 against.

Looking back at , I'm pleasantly
surprised!  Thanks!

-- 
Christoph M. Becker

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DEV] Re: [VOTE] Deprecate and remove case-insensitive constants

2018-07-16 Thread Nikita Popov
On Mon, Jul 9, 2018 at 10:36 AM, Nikita Popov  wrote:

> Hi,
>
> I would like to open the vote on the RFC for the deprecation (in PHP 7.3)
> and removal (in PHP 8.0) of case-insensitive constants.
>
> https://wiki.php.net/rfc/case_insensitive_constant_deprecation
>
> If you missed the discussion for this RFC, you can read up on it here:
>
> https://externals.io/message/102389
>
> As this is a language change, the vote requires a 2/3 supermajority. The
> vote will be open until 2018-07-09.
>

I'm happy to announce that this RFC has been accepted unanimously with 39
votes in favor and 0 against.

Nikita


Re: [PHP-DEV] Re: [VOTE] Deprecate and remove case-insensitive constants

2018-07-10 Thread Niklas Keller
> Hi Nikita,
>
> I'm a terrible person for only bringing this up now (I apologise for not
> following the list as closely as I used to), but one reason
> case-insensitive constants are maybe useful is they leave open the
> possibility of being able to access functions as values in future: like
> some constants, function names are case-insensitive, and a fallback
> could be added to constant accesses to return a closure of the function
> with the same name if no constant is found.
>
> Of course, removing case-insensitive constants wouldn't preclude such a
> feature, just make it a little more annoying to implement, so this is
> not really a significant reason to vote against. To that end, I'll vote
> in favour of this deprecation.

No, thanks. The fallback is already a bad thing for functions, we
don't need another one.

If such a feature would be implemented, it'd probably be via combined
symbol tables, making either everything case-insensitive or everything
case-sensitive.

Regards, Niklas

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DEV] Re: [VOTE] Deprecate and remove case-insensitive constants

2018-07-09 Thread Andrea Faulds

Hi Nikita,

I'm a terrible person for only bringing this up now (I apologise for not 
following the list as closely as I used to), but one reason 
case-insensitive constants are maybe useful is they leave open the 
possibility of being able to access functions as values in future: like 
some constants, function names are case-insensitive, and a fallback 
could be added to constant accesses to return a closure of the function 
with the same name if no constant is found.


Of course, removing case-insensitive constants wouldn't preclude such a 
feature, just make it a little more annoying to implement, so this is 
not really a significant reason to vote against. To that end, I'll vote 
in favour of this deprecation.


Thanks!
--
Andrea Faulds
https://ajf.me/

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DEV] Re: [VOTE] Deprecate and remove case-insensitive constants

2018-07-09 Thread Nikita Popov
On Mon, Jul 9, 2018 at 10:36 AM, Nikita Popov  wrote:

> Hi,
>
> I would like to open the vote on the RFC for the deprecation (in PHP 7.3)
> and removal (in PHP 8.0) of case-insensitive constants.
>
> https://wiki.php.net/rfc/case_insensitive_constant_deprecation
>
> If you missed the discussion for this RFC, you can read up on it here:
>
> https://externals.io/message/102389
>
> As this is a language change, the vote requires a 2/3 supermajority. The
> vote will be open until 2018-07-09.
>

Whoops, this was supposed to be 2018-07-16.

Nikita