Re: [PHP-DEV] Inconsistent class behavior and undocumented(?) BC change

2020-01-06 Thread Nikita Popov
On Mon, Jan 6, 2020 at 7:18 PM Larry Garfield wrote: > On Mon, Jan 6, 2020, at 5:16 AM, Nikita Popov wrote: > > > Others have already explained why constructors are exempted from LSP > > checks, so let me reply to your other point... > > > > I believe that your example should indeed be legal in g

Re: [PHP-DEV] Inconsistent class behavior and undocumented(?) BC change

2020-01-06 Thread Larry Garfield
On Mon, Jan 6, 2020, at 5:16 AM, Nikita Popov wrote: > Others have already explained why constructors are exempted from LSP > checks, so let me reply to your other point... > > I believe that your example should indeed be legal in general and created a > PR to fix this: https://github.com/php/php

Re: [PHP-DEV] Inconsistent class behavior and undocumented(?) BC change

2020-01-06 Thread Nikita Popov
On Sun, Dec 8, 2019 at 1:29 AM Larry Garfield wrote: > I am not sure if this is a bug, a feature behaving in a desired but > confusing way, or a feature behaving in a confusing and thus undesireable > way. I am therefore reporting it here in order to defer to those who know > the answer to such

Re: [PHP-DEV] Inconsistent class behavior and undocumented(?) BC change

2019-12-08 Thread Larry Garfield
On Sun, Dec 8, 2019, at 10:14 AM, Rowan Tommins wrote: > On 08/12/2019 05:03, Mike Schinkel wrote: > > Hi Larry, > > > >> I am not clear on why __construct() is special in this case; > > I believe that is the Liskok substitution principle at work, and that fact > > the principle does not apply to

Re: [PHP-DEV] Inconsistent class behavior and undocumented(?) BC change

2019-12-08 Thread Rowan Tommins
On 08/12/2019 05:03, Mike Schinkel wrote: Hi Larry, I am not clear on why __construct() is special in this case; I believe that is the Liskok substitution principle at work, and that fact the principle does not apply to constructors. For reference: -https://softwareengineering.stackexchange

Re: [PHP-DEV] Inconsistent class behavior and undocumented(?) BC change

2019-12-07 Thread Mike Schinkel
Hi Larry, > I am not clear on why __construct() is special in this case; I believe that is the Liskok substitution principle at work, and that fact the principle does not apply to constructors. For reference: - https://softwareengineering.stackexchange.com/a/302477/9114 - https://www.sitepoint

[PHP-DEV] Inconsistent class behavior and undocumented(?) BC change

2019-12-07 Thread Larry Garfield
I am not sure if this is a bug, a feature behaving in a desired but confusing way, or a feature behaving in a confusing and thus undesireable way. I am therefore reporting it here in order to defer to those who know the answer to such questions better. Consider the following: class Ancestor {