Re: [RFC] Static property asymmetric visibility

From: Date: Tue, 14 Jan 2025 18:17:31 +0000
Subject: Re: [RFC] Static property asymmetric visibility
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-126210@lists.php.net to get a copy of this message
> Le 25 nov. 2024 à 17:52, Larry Garfield <larry@garfieldtech.com> a écrit : > > Static property asymmetric visibility was left out of the original RFC, because it seemed like > it would be hard and of little use. Turns out, Ilija found a way to make it easy. (Ilija is > smart.) So here's a small RFC to add aviz to static properties, because we can't think of > a reason to NOT do so. > > https://wiki.php.net/rfc/static-aviz Hi, About use case: Looking at my code, I’ve found places where I store data (e.g. global config values) in public static properties, but those data is supposed to be initialised and/or modified only inside the class. In those cases, aviz would allow me to document and enforce what is currently a gentleman's agreement. —Claude

« previous php.internals (#126210) next »