Re: [PHP-DEV] #[Deprecated] Attribute

2025-06-01 Thread Ben Ramsey
On 6/1/25 17:31, fennic log wrote: I have needed this as well at work for a shared library and i'm sure many library authors would use it too. Current IDE's like jetbrains has support for #[Deprecated($reason, $replacement)] which will throw warning in the IDE, see their implementation here: http

Re: [PHP-DEV] #[Deprecated] Attribute

2025-06-01 Thread fennic log
On Tue, 27 May 2025 at 20:05, Ben Ramsey wrote: > > On Jan 13, 2021, at 06:43, Benjamin Eberlei wrote: > > > > On Wed, Jan 13, 2021 at 1:05 PM Brent Roose wrote: > > > >> Hi Sara > >> > >>> On 22 Dec 2020, at 19:54, Sara Golemon wrote: > >>> > >>> On Tue, Dec 22, 2020 at 12:35 PM Nicolas Greka

Re: [PHP-DEV] Module or Class Visibility, Season 2

2025-06-01 Thread Rowan Tommins [IMSoP]
On 01/06/2025 17:05, Larry Garfield wrote: I think there's a key assumption here still that is at the root of much of the disagreement in this thread. Given that code from multiple files is clustered together into a "thing" and Given we can use that "thing" to define a boundary for: * name reso

Re: [PHP-DEV] Module or Class Visibility, Season 2

2025-06-01 Thread Michael Morris
On Sun, Jun 1, 2025 at 3:18 AM Rob Landers wrote: > This could work! I have a couple of critiques, but they aren’t negative: > > I think I like it. It might be worth pointing out that JavaScript "hoists" > the imports to file-level during compilation — even if you have the import > statement buri

Re: [PHP-DEV] Module or Class Visibility, Season 2

2025-06-01 Thread Larry Garfield
On Sun, Jun 1, 2025, at 12:26 AM, Michael Morris wrote: > $myModule = require_module('file/path'); > > or perhaps > > const myModule = require_module('file/path'); > > The module probably should return a static class or class instance, but > it could return a closure. In JavaScript the dynamic

Re: [PHP-DEV] Module or Class Visibility, Season 2

2025-06-01 Thread Rob Landers
On Sun, Jun 1, 2025, at 09:17, Rob Landers wrote: > > > On Sun, Jun 1, 2025, at 07:26, Michael Morris wrote: >> Ok, the conversation is getting sidetracked, but I think some progress is >> being made. >> >> I started this latest iteration last year with a thread about introducing >> somethin

Re: [PHP-DEV] Module or Class Visibility, Season 2

2025-06-01 Thread Rob Landers
On Sun, Jun 1, 2025, at 07:26, Michael Morris wrote: > Ok, the conversation is getting sidetracked, but I think some progress is > being made. > > I started this latest iteration last year with a thread about introducing > something similar to the ES module system of JavaScript to PHP. What at