Re: [PHP-DEV] [Discussion] "Internal" attribute and warning

2024-05-20 Thread Robert Landers
On Mon, May 20, 2024 at 6:58 PM Larry Garfield wrote: > > On Sat, May 18, 2024, at 6:15 PM, Robert Landers wrote: > > >> I think an important question to answer here is what we want to have as > >> our definition of "package". > >> > >> 1. Should the package be defined by the namespace? If so, an

Re: [PHP-DEV] [Discussion] "Internal" attribute and warning

2024-05-20 Thread Larry Garfield
On Sat, May 18, 2024, at 6:15 PM, Robert Landers wrote: >> I think an important question to answer here is what we want to have as our >> definition of "package". >> >> 1. Should the package be defined by the namespace? If so, anyone can put >> code into any namespace; it's not even hard to add

Re: [PHP-DEV] [Discussion] "Internal" attribute and warning

2024-05-19 Thread Robert Landers
On Sun, May 19, 2024 at 10:52 AM Andreas Heigl wrote: > > Hey Robert. > > Am 19.05.24 um 09:38 schrieb Robert Landers: > > On Sat, May 18, 2024 at 9:11 PM Andreas Heigl wrote: > >> > >> > >> > >> Am 18.05.24 um 19:46 schrieb Robert Landers: > >>> On Sat, May 18, 2024 at 7:38 PM Andreas Heigl wro

Re: [PHP-DEV] [Discussion] "Internal" attribute and warning

2024-05-19 Thread Andreas Heigl
Hey Robert. Am 19.05.24 um 09:38 schrieb Robert Landers: On Sat, May 18, 2024 at 9:11 PM Andreas Heigl wrote: Am 18.05.24 um 19:46 schrieb Robert Landers: On Sat, May 18, 2024 at 7:38 PM Andreas Heigl wrote: Hey all. Am 18.05.24 um 16:00 schrieb Robert Landers: [snip] I guess that de

Re: [PHP-DEV] [Discussion] "Internal" attribute and warning

2024-05-19 Thread Robert Landers
On Sat, May 18, 2024 at 10:33 PM Barney Laurance wrote: > > On 18/05/2024 15:00, Robert Landers wrote: > > Hello internals, > > > > I've been thinking about having an "internal" attribute that will emit > > a warning if called from outside it's left-most namespace. > > Hello Robert, > > It's worth

Re: [PHP-DEV] [Discussion] "Internal" attribute and warning

2024-05-19 Thread Robert Landers
On Sat, May 18, 2024 at 9:11 PM Andreas Heigl wrote: > > > > Am 18.05.24 um 19:46 schrieb Robert Landers: > > On Sat, May 18, 2024 at 7:38 PM Andreas Heigl wrote: > >> > >> Hey all. > >> > >> Am 18.05.24 um 16:00 schrieb Robert Landers: > >>> Hello internals, > >>> > >>> I've been thinking about

Re: [PHP-DEV] [Discussion] "Internal" attribute and warning

2024-05-18 Thread Barney Laurance
On 18/05/2024 15:00, Robert Landers wrote: Hello internals, I've been thinking about having an "internal" attribute that will emit a warning if called from outside it's left-most namespace. Hello Robert, It's worth looking at the prior art on this - the @internal annotation from PHPDoc, and

Re: [PHP-DEV] [Discussion] "Internal" attribute and warning

2024-05-18 Thread Andreas Heigl
Am 18.05.24 um 19:46 schrieb Robert Landers: On Sat, May 18, 2024 at 7:38 PM Andreas Heigl wrote: Hey all. Am 18.05.24 um 16:00 schrieb Robert Landers: Hello internals, I've been thinking about having an "internal" attribute that will emit a warning if called from outside it's left-most n

Re: [PHP-DEV] [Discussion] "Internal" attribute and warning

2024-05-18 Thread Robert Landers
On Sat, May 18, 2024 at 7:58 PM Larry Garfield wrote: > > On Sat, May 18, 2024, at 11:06 AM, Andreas Heigl wrote: > > Hey all. > > > > Am 18.05.24 um 16:00 schrieb Robert Landers: > >> Hello internals, > >> > >> I've been thinking about having an "internal" attribute that will emit > >> a warning

Re: [PHP-DEV] [Discussion] "Internal" attribute and warning

2024-05-18 Thread Rowan Tommins [IMSoP]
On 18 May 2024 16:25:06 BST, Robert Landers wrote: >I thought about that too, but in-general, a vendor has the knowledge >and capability to ensure any two packages work together (like Doctrine >plugins in your example). How do they achieve that "knowledge and capability" other than documentati

Re: [PHP-DEV] [Discussion] "Internal" attribute and warning

2024-05-18 Thread Robert Landers
On Sat, May 18, 2024 at 7:38 PM Andreas Heigl wrote: > > Hey all. > > Am 18.05.24 um 16:00 schrieb Robert Landers: > > Hello internals, > > > > I've been thinking about having an "internal" attribute that will emit > > a warning if called from outside it's left-most namespace. > > > > It might loo

Re: [PHP-DEV] [Discussion] "Internal" attribute and warning

2024-05-18 Thread Larry Garfield
On Sat, May 18, 2024, at 11:06 AM, Andreas Heigl wrote: > Hey all. > > Am 18.05.24 um 16:00 schrieb Robert Landers: >> Hello internals, >> >> I've been thinking about having an "internal" attribute that will emit >> a warning if called from outside it's left-most namespace. >> >> It might look so

Re: [PHP-DEV] [Discussion] "Internal" attribute and warning

2024-05-18 Thread Andreas Heigl
Hey all. Am 18.05.24 um 16:00 schrieb Robert Landers: Hello internals, I've been thinking about having an "internal" attribute that will emit a warning if called from outside it's left-most namespace. It might look something like this: namespace MyCompany\PackageA { #[\Internal] function d

Re: [PHP-DEV] [Discussion] "Internal" attribute and warning

2024-05-18 Thread Robert Landers
On Sat, May 18, 2024 at 5:18 PM Rowan Tommins [IMSoP] wrote: > > On 18/05/2024 15:00, Robert Landers wrote: > > I've been thinking about having an "internal" attribute that will emit > a warning if called from outside it's left-most namespace. > > > I like the general idea, but I don't think limit

Re: [PHP-DEV] [Discussion] "Internal" attribute and warning

2024-05-18 Thread Rowan Tommins [IMSoP]
On 18/05/2024 15:00, Robert Landers wrote: I've been thinking about having an "internal" attribute that will emit a warning if called from outside it's left-most namespace. I like the general idea, but I don't think limiting to "left-most namespace" is the best semantics. It's very common f

Re: [PHP-DEV] [Discussion] "Internal" attribute and warning

2024-05-18 Thread Saki Takamachi
Hi Robert, > Hello internals, > > I've been thinking about having an "internal" attribute that will emit > a warning if called from outside it's left-most namespace. > > It might look something like this: > > namespace MyCompany\PackageA { > #[\Internal] function doStuff() {} > } > > namespa

[PHP-DEV] [Discussion] "Internal" attribute and warning

2024-05-18 Thread Robert Landers
Hello internals, I've been thinking about having an "internal" attribute that will emit a warning if called from outside it's left-most namespace. It might look something like this: namespace MyCompany\PackageA { #[\Internal] function doStuff() {} } namespace OtherCompany\PackageB { \MyComp