Re: [PHP-DEV] [RFC] Throw Exception on Attempt of Constant Redefinition

2016-06-20 Thread Rowan Collins
On 20 June 2016 21:42:43 GMT+01:00, Dmitry Stogov wrote: >The RFC was updated to propose this change only for PHP 8.0, and >thereby, vote is delayed for uncertain time. Why can't we have a vote now, committing to a change in 8.0? Doing so would have two advantages: - Users have extra advantage w

Re: [PHP-DEV] [RFC] Throw Exception on Attempt of Constant Redefinition

2016-06-20 Thread Dmitry Stogov
___ From: Pierre Joye Sent: Friday, June 17, 2016 9:31:33 AM To: Dmitry Stogov Cc: PHP internals; Stas Malyshev Subject: Re: [PHP-DEV] [RFC] Throw Exception on Attempt of Constant Redefinition On Jun 17, 2016 1:10 PM, "Dmitry Stogov" mailto:dmi...@zend.com>> wrote: > >

Re: [PHP-DEV] [RFC] Throw Exception on Attempt of Constant Redefinition

2016-06-16 Thread Pierre Joye
On Jun 17, 2016 1:10 PM, "Dmitry Stogov" wrote: > > Got it :( > Then this may be a serious BC break, and it's better to depricate it in 7.1 and throw exception only in 8. Fully agree. Thanks :) > Thanks. Dmitry. > > > > On Thu, Jun 16, 2016 at 8:14 PM +0300, "Stanislav Malyshev" < smalys...@gmai

Re: [PHP-DEV] [RFC] Throw Exception on Attempt of Constant Redefinition

2016-06-16 Thread Dmitry Stogov
Got it :( Then this may be a serious BC break, and it's better to depricate it in 7.1 and throw exception only in 8. Thanks. Dmitry. On Thu, Jun 16, 2016 at 8:14 PM +0300, "Stanislav Malyshev" mailto:smalys...@gmail.com>> wrote: Hi! > Please review: https://wiki.php.net/rfc/constant_redefin

Re: [PHP-DEV] [RFC] Throw Exception on Attempt of Constant Redefinition

2016-06-16 Thread Stanislav Malyshev
Hi! > Please review: https://wiki.php.net/rfc/constant_redefinition I would propose to not throw an error if constant is redefined to exactly the same value. Some of the code might be doing this unknowingly, e.g. by writing include instead of include_once, and there's no real reason to break it.

Re: [PHP-DEV] [RFC] Throw Exception on Attempt of Constant Redefinition

2016-06-16 Thread Lester Caine
On 16/06/16 07:44, Dmitry Stogov wrote: > RFC also proposes a way to "fix" affected applications, wrapping constant > definitions, that may be redefined, with try/catch. Doesn't anybody remember the problems which STILL have to be resolved with changes in PHP5.2/3/4 which require the assistance o

Re: [PHP-DEV] [RFC] Throw Exception on Attempt of Constant Redefinition

2016-06-16 Thread Pierre Joye
On Jun 11, 2016 4:27 AM, "Dmitry Stogov" wrote: > > In general, you are right, but this is possible only if application ignores Error exceptions... Exactly. Many if not hundred of applications do not even use exception but if a couple of places, let alone plug-ins for these apps. Most of these

Re: [PHP-DEV] [RFC] Throw Exception on Attempt of Constant Redefinition

2016-06-15 Thread Dmitry Stogov
cations, wrapping constant definitions, that may be redefined, with try/catch. Thanks. Dmitry. From: Dmitry Stogov Sent: Friday, June 10, 2016 11:06:55 PM To: PHP internals Subject: [PHP-DEV] [RFC] Throw Exception on Attempt of Constant Redefinition Hi interna

Re: [PHP-DEV] [RFC] Throw Exception on Attempt of Constant Redefinition

2016-06-11 Thread Fleshgrinder
On 6/10/2016 10:06 PM, Dmitry Stogov wrote: > Hi internals, > > > Please review: https://wiki.php.net/rfc/constant_redefinition > > > Thanks. Dmitry. > This would be a breaking change in a minor release again. -1 However +1 for PHP 8. -- Richard "Fleshgrinder" Fussenegger signature.asc

Re: [PHP-DEV] [RFC] Throw Exception on Attempt of Constant Redefinition

2016-06-11 Thread Xinchen Hui
Hey: On Sat, Jun 11, 2016 at 4:06 AM, Dmitry Stogov wrote: > Hi internals, > > > Please review: https://wiki.php.net/rfc/constant_redefinition we could also change the #define DEFAULT_OPTIMIZATION_LEVEL "0x7FFFBFFF" (introduced in https://github.com/php/php-src/commit/40702799b5f08b093477098

Re: [PHP-DEV] [RFC] Throw Exception on Attempt of Constant Redefinition

2016-06-10 Thread Dmitry Stogov
] Throw Exception on Attempt of Constant Redefinition On Fri, Jun 10, 2016 at 2:06 PM, Dmitry Stogov wrote: > Hi internals, > > > Please review: https://wiki.php.net/rfc/constant_redefinition > > > Thanks. Dmitry. Dmitry, I am not sure this change will actually allow consta

Re: [PHP-DEV] [RFC] Throw Exception on Attempt of Constant Redefinition

2016-06-10 Thread Levi Morrison
On Fri, Jun 10, 2016 at 2:06 PM, Dmitry Stogov wrote: > Hi internals, > > > Please review: https://wiki.php.net/rfc/constant_redefinition > > > Thanks. Dmitry. Dmitry, I am not sure this change will actually allow constant propagation either. Consider this code: In this series of events: -

[PHP-DEV] [RFC] Throw Exception on Attempt of Constant Redefinition

2016-06-10 Thread Dmitry Stogov
Hi internals, Please review: https://wiki.php.net/rfc/constant_redefinition Thanks. Dmitry.