Re: [PHP-DEV] Drop warning about non-public magic methods

2020-07-14 Thread Nikita Popov
On Mon, Jul 13, 2020 at 9:32 PM Mark Randall wrote: > On 13/07/2020 19:32, Gabriel Caruso wrote: > > This warning does not make much sense as the magic method is executed > > regardless of its visibility. Should it be dropped? > This seems to be the bigger issue... if something is specified as >

Re: [PHP-DEV] Drop warning about non-public magic methods

2020-07-13 Thread Marcio Almada
Hi Grabriel, Hello internals, > > During the development of https://wiki.php.net/rfc/magic-methods-signature > I > found something that I'd like to share with you, and possibly propose to > drop it: there's a warning that php-src throws when a magic method is > declared with visibility different

Re: [PHP-DEV] Drop warning about non-public magic methods

2020-07-13 Thread Mark Randall
On 13/07/2020 19:32, Gabriel Caruso wrote: This warning does not make much sense as the magic method is executed regardless of its visibility. Should it be dropped? This seems to be the bigger issue... if something is specified as private, nothing outside its scope has any rights to access it,

Re: [PHP-DEV] Drop warning about non-public magic methods

2020-07-13 Thread Josh Bruce
Curious. I tend to follow PSR-12 (with few exceptions): https://www.php-fig.org/psr/psr-12/#44-methods-and-functions Which requires visibility declaration on all members (methods and properties). Would dropping the requirement

[PHP-DEV] Drop warning about non-public magic methods

2020-07-13 Thread Gabriel Caruso
Hello internals, During the development of https://wiki.php.net/rfc/magic-methods-signature I found something that I'd like to share with you, and possibly propose to drop it: there's a warning that php-src throws when a magic method is declared with visibility different than `public`: