« first day (3847 days earlier)      last day (1101 days later) » 
00:00 - 20:0020:00 - 00:00

12:03 AM
the main thing i wanted to discuss in internals is how should sealed interfaces behave, and literally only 1 email replies to that, out of 64!
 
12:13 AM
Yeah, you've got to write RFCs in a way that direct the conversation in the path you want it to go......
Also, people are replying to mike.
oh, David Gebler might be with.....range.....of me IRL.
 
quite a few responses are to Olle too
 
Apropos of nothing @SaifEddinGmati, I think one problem with email (, and similarly forums), is that they are slow enough for people to work up 'steam' about an issue, but fast enough that people try to win conversations by shouting down the other side.

Both the extremes of real-time chat, and only communicating via blog-post/letter/speech seem to avoid creating 'heat', and are better at producing productive conversations.
 
Apr 24 at 11:48, by Saif Eddin Gmati
the answer is easy: switch to a modern open source web platform, and the community will contribute.

the community is full of web developers, who are willing to help, but not with this stuff.
strong possibility you already saw that conversation, but figured it would be useful to link the thread together
 
> the community will contribute.
> who are willing to help
"I'll take lies open source advocates tell for $400."
Also, the community want to have their voices heard. That' not necessarily the basis for a productive discussion platform.
 
12:30 AM
@SaifEddinGmati I've been strongly considering upgrading my primary monitor to this amazon.com/LG-27GL850-B-Ultragear-Compatible-Monitor/dp/…. One reason is so I can move the Dell monitor to my workstation as a third monitor in portrait-mode. Another reason is because I want a third monitor on my workstation because I am frequently juggling windows between the two monitors.
I haven't decided yet if I'm going to spring for the LG monitor.
 
o/
not sure if that's galaxybrain.jpg or noshit.gif or even youarewrongshouldfeelbad.png but I start to believe that supporting old browsers should not be web developper's responsibility. In an ideal world, we'd use modern ecmascript and/or css constructs (like display: grid; or () => {};) and alert older browser users that their browser provider should support the content they're trying to access.
 
@FélixGagnon-Grenier Many developers already do that. It's a question of how far back to support, which depends a bit on the industry.
 
Hardware, sometimes. My phone is probably three or four years old, I don't have much reason to upgrade other than to have a supported version of Android.
 
@Crell Great! I feel slightly less culpability about single-handedly imposing that view upon my client's website ;)
@Tiffany does it support grid? that's my rule of thumb.
 
Browser support is a sliding scale. But really, there's a LOT of functionality that is well supported by 90%+ of the overall market that no one thinks they can use yet.
 
12:47 AM
@FélixGagnon-Grenier can't actually tell based on caniuse, I'm on Chrome 88 on Android (Oreo), according to whatismybrowser. I suppose I'll try googling for a site that uses grid, (don't exactly want to because I fear I may have to dig around for one)
Okay, that was easier than I thought... cssgrid.design
 
:)
drumrolls
 
It works :P
 
12:59 AM
@Tiffany \o/
 
1:20 AM
@SaifEddinGmati btw, as bad as internals email list is, at least it isn't being used to organise an insurrection: buzzfeednews.com/article/craigsilverman/…
 
Internals is also way nicer and more on topic than it once was.
 
@Crell for RFCs things are probably better, though the number of discussions that result in actual changes in the RFC is suspiciously low. Discussions of actual work that needs to be done, seems to have gone away, though probably a lot of that has moved to PRs. Not useful conversations of "wouldn't it be cool if someone did this huge amount of work about an idea I've spent 5 minutes thinking about!" have increased.
I think the following have remained about the same, but with different, and more dissapotining people involved:
 
True. I meant more the level of "you're an asshole and should feel bad" is lower now than in the 2008 era.
(I've been on the list since 2007 and the GoPHP5 project, even if I only started directly contributing last year.)
 
Yeah, but also the number of people who contribute to PHP using the mailing has probably also gone down both as a percentage, and in total. e.g. most of the release managers don't get involved in conversations.
Also, Zend was sold, so ......... insert "some sort of correlation between a commercial entity having it's own view about an open source project and trying to dominate the conversation" here.
 
1:45 AM
Less emotional pain, more psychological pain? (Less "this idea is dumb and you should do something worse than stepping on a lego," more "this is my five-minute-researched idea!"? Though, at least if it comes to "this idea is dumb," people are much more civil in stating it rather than being rude for the sake of being rude)
 
1:59 AM
@SaifEddinGmati I tried getting it back on track. Sorry it didn't work out.
 
There's Ben, doing is release manager duties already. :-)
 
I have at least two bugs that only manifest release builds right now. Ugh.
I hit a bug that only happens in release builds, so I added release builds to my CI test matrix, which hit a different bug that only happens in release builds >.<
At least they are both reproducible.
 
 
4 hours later…
5:38 AM
Pls help me ・ PDO related ・ #80997
 
6:12 AM
o/
 
6:43 AM
\o
 
o/
 
7:03 AM
\o
 
7:33 AM
o/
 
posted on April 28, 2021

 
7:48 AM
I stopped reading the sealed classes thread shortly after it started ... the last reply mentions "operator overloading and multiple inheritance" ... way to loose focus ...
@SaifEddinGmati you could get started on a test suite, treat the suite as the specification of the feature, number tests in a logical order - at least prefix with a number (because of sorting) ... start with the simplest cases and finish with the most complex ... when I have a test suite I'll start making it work ...
hey @PatrickAllaert, how you getting on getting setup, you all ready (except for possibly the moderate mailing list thing) ?
 
8:42 AM
@SaifEddinGmati Yes, ./build/gen_stub.php generates the arginfo files
 
@JoeWatkins Personally I do the same, I said what I wanted to say and that's it
Following the discussion is to exhaustive already
 
9:08 AM
Missing second with inverted interval ・ Date/time related ・ #80998
 
9:19 AM
Morning r11
 
Yahallo
 
9:36 AM
@JoeWatkins okay!
 
 
2 hours later…
11:27 AM
Question to the podcasters on Linux: what mic are you using and if it's an xlr, what audio interface?
 
11:45 AM
I know @Derick and @beberlei do podcasts, so recommendations would be appreciated.
 
12:04 PM
@Gordon Personally for streaming I use a Rode NT-1. It needs Phantom Power so I have a small Mackie mic mixer. Something like this will do: guitarcenter.com/Yamaha/…
One of the most popular right now though is the Shure SM7B.
@Gordon However, I would also like to mention this one. This is sort of an all-in-one solution, and it sounds really good. I picked one up for times when I was just wanting to throw something up and it had everything I needed. amazon.com/Shure-MV51-Large-Diaphragm-Condenser-Microphone/dp/…
@Gordon You can hear the quality of the Rode NT-1 here from my last stream: youtu.be/-5ERXclBh40
 
Thanks. I am currently considering the Shure MV7, but I am unsure if it will work on Linux. I read conflicting reports.
 
@Gordon If you use a mic mixer and just run from that via 3.5mm you can use whatever mic you want, which is the better option. =)
 
I'm kinda hesitant to go that route because it will cost extra equipment/money. The MV7 is both USB and XLR, so I felt it to be a good starter
 
Understandable.
 
12:25 PM
The Rode sounds nice though
 
1:06 PM
@Gordon I'm using a Snowball Ice, with a popup filter to stop the p's, b's, and f's.
 
1:28 PM
@Derick Yeah, the NT-1 came with one which was a bonus and needed for my voice. =)
 
The GoXLR mini is constantly out of stock on amazon, v annoying
 
That is expensive. Why not just get a small mixer?
 
I use an SM7B, it's very gain hungry
 
ugh yeah, that's was such a dick move
 
Yea... they effectively ran a penetration test against an organization without their permission. It'd be like if I tried to rob a bank, got caught and then said "Just kidding! Was testing y'all to see how good your security is!"
 
2:26 PM
there's a feature request for protected tags on github .... it's existed for several years /cc @NikiC
so we're on our own ...
 
2:41 PM
count() produce Fatal Error ・ *General Issues ・ #80999
 
cmb
would dev.to/azure/… be viable for us?
 
@JoeWatkins Hey @JoeWatkins. Things are on their way!
@JoeWatkins For the mailing list moderation, just mailed @Derick about it.
@JoeWatkins I dont know the status for the release-managers@ distribution list, Rasmus did the setup for downloads.php.net
 
3:00 PM
@cmb ooh, I'll read
@PatrickAllaert probably derick too ...
@cmb tentative yes, I gave up when it was 40% yml ... but it looks like niki has found a thing we can do with webhooks now ...
 
cmb
AIUI, the webhooks would be pure notifications, though; an approval workflow would prevent changes in the first place (if it's possible)
 
oh ... but actions/azure are post commit, by the time they're doing anything the bad thing is done, no ?
 
should the error message here be a little bit more clear? 3v4l.org/1D6W5
 
TIL there's a gender extension...
IS_FEMALE, IS_MOSTLY_FEMALE, IS_MALE, IS_MOSTLY_MALE, IS_UNISEX_NAME
 
cmb
@JoeWatkins at the end of the page is a section "Running the workflow"; if I don't misunderstand it, the action is triggered, but nothing is published without explicit approval (apparently, up to 6 people can be allowed to do this approval)
 
3:11 PM
@SaifEddinGmati If it's reasonable to be able to spot circular dependencies, a nicer error message would be helpful. If not, I suspect it's a rare enough case that it's not worth a lot of work.
 
ah yes, the one that defines genders

my gender is `Gender::ANY_COUNTRY`
thought what would happen if you do:

```
sealed interface A permits B {}
sealed interface B permits A {}
```
^ this is basically two final interfaces
 
I would expect that to break.
 
@cmb right so it drafts a release on push of a tag, then someone has to approve it, and then it goes on to publish the release
 
@Crell why? or more specially, when should it error?
 
@SaifEddinGmati Well... OK, perhaps it wouldn't error. It's technically not a circular dependency at compile time. But since you could never actually use either of those interfaces without an error, it's a useless construct to define.
 
3:17 PM
@SaifEddinGmati if this is about the sealed rfc tests, don't worry so much about the wording of the message, if something should throw an exception, catch it by type and echo "OK" or whatever, print getMessage on failure, but don't test for it's contents
 
yea, that's what i thought, another case ( if we allow interfaces to extend sealed interfaces without restrict to be able to seal throwable and date time interface ).

```
sealed interface Foo permits Bar, Baz {}
final class Bar implements Foo {}
final class Baz implements Foo {}

interface Qux extends Foo {} // this interface can never be implemented
```
@JoeWatkins will push a test PR later, i'm just thinking of all possible cases right now :p
 
I would expect Qux to error, because it's not in the set [Bar, Baz]
 
cmb
@JoeWatkins yes; however, I'm afraid we can't prevent that someone changes the release artifacts afterwards :(
 
yea .. but then we won't be able to declare Throwable and DateTimeInterface as sealed, which is one of the reasons* behind the RFC ( bring more consistency with builtin stuff )
 
They're already weird. As long as they don't get more weird, I'm happy.
 
3:24 PM
this is now valid:
```
namespace MyProject;

interface ExecptionInterface extends Throwable {}
class RuntimeException extends \RuntimeException implements ExceptionInterface {}
```

if `Throwable` would be sealed to `Error` and `Exception`, then that's a BC break ( e.g PSR 11 exceptions extends Throwable )

the solution is to only enforce permits/sealing on classes, but ignore interfaces.

```
sealed interface Throwable permits Error, Exception {}

interface MyInterface extends Throwable {} // okay .. for the sake of BC
 
Hm. So interfaces ignore sealing, but since they don't actually do anything without a class, you can still enforce the sealing when they get to a class?
 
yes, basically MyInterface inherits the sealing enforcement of Throwable
 
I would be OK with that. Explaining it well in the RFC would be key.
 
@NikiC Just making sure you saw this comment on an already merged PR: github.com/php/php-src/pull/6825#issuecomment-826021264.
 
if i have this in my library:

```
sealed interface Result permits Success, Failure {}
final class Success extends Result {}
final class Failure extends Result {}
```

i know there will not be another object instance beside Success and Failure, there might be another interface extending Result, but it can't be implemented.
 
3:28 PM
I'd be okay with not allowing you to declare sealing on interfaces at all ... interfaces are public, that's the point of an interface ...
 
Right.
 
@JoeWatkins i would rather we do, again, for the sake of consistency
 
you just said you wanted to ignore it ?
 
What possible reason would there be to seal an interface?
 
Throwable and DateTimeInterface. (I don't know when you would in user space, though.)
 
3:30 PM
not really ignore it, this will fail:

```
interface MyResult extends Result {}
class MySuccess implements MyResult {} // Error: cannot implement Result, extend either Success or Failure
```
 
we don't need a way to stop you implementing internal classes/interfaces, that already exists, sealing is for userspace
 
Sergey if you read this, do a better job at getting rid of PHP 5 references because removing nearly all (but not all) of the mentions on a page is bloody annoying
 
:52087147
basically same as: 3v4l.org/lTGYh
 
Ah ok, that does make sense.
 
@JoeWatkins we don't, because the engine have it's way of doing stuff internally, but this way we bring more consistency, the engine doesn't need a special case to stop people from implementing Throwable or DateTimeInterface anymore, just follow the standard sealed interfaces.
 
3:33 PM
@NikiC "b) Subtle side-effects, visible in debugging functionality, or through
destructor effects (the fact that a variable is captured may be
observable). I think it nothing else, the RFC should at least make clear
that this behavior is explicitly unspecified, and a future implementation
may no longer capture variables where any path from entry to read passes a
write."

I don't quite follow, especially the second sentence. Any path from entry to what now?
 
There was discussion the other day about how attributes don't provide a good mechanism for extension. Would it make sense to implement observers that an extension could subscribe to when an attribute is attached?
 
maybe, but first you need attributes to be inheritable
once you fixed that I'm not sure you need the observer API, any more hooks probably belong with the existing hook ...
 
@Crell in Nikita's example, $tmp is always written before it's read, so a "smart" implementation would know not to capture a value from outer scope for it
if there was in if statement in there, the analysis would have to follow both paths of the if to make sure it was still true
 
Ah. @NunoMaduro, this one is in your area. :-)
 
3:42 PM
@JoeWatkins The existing hook seems to be "loop over the attributes on this item and see if the attribute is attached," is that right?
 
I dunno what it's for
 
@LeviMorrison I don't think it affects extensions
 
apparently it's got the wrong arguments and is executed at the wrong time, or both ...
 
@cmb the difference is not by-ref vs by-value, but capture vs no-capture; so 3v4l.org/Utd9j vs 3v4l.org/fpjbX is a better example
 
@LeviMorrison It's not obvious from these additions, but sanitizers do tend to need special handling, so it's useful to have them in the build system
e.g. on clang, I think if you tried to build with ubsan right now (outside fuzzer) you'd get a slew of warnings due to objectsize
This provides a central place to configure sanitizers in the correct way for php-src
 
cmb
3:45 PM
@IMSoP thanks; that's actually what I wanted to show (somehow messed that up)
 
@NikiC Then we should extend this to the extension ecosystem, IMO.
 
@LeviMorrison Extensions should do their own builds with the option
 
@NikiC Not from scratch, imo.
 
@Trowski I don't see any reason for attributes to trigger hooks; the hooks need to be wherever in the engine the behaviour needs to go; attributes are just information the extension can use
 
Should be some sort of include(sanitizers) that makes it trivial, if not automatic.
 
3:47 PM
get flags from php-config maybe ?
 
e.g. if a profiler wants to support an attribute of #[ExcludeFromProfiling], it doesn't need to be notified when the attribute is added, it just needs to check in its existing function hook whether the attribute is present
 
Notably -fsanitize=memory requires everything to be built this way for it to work right. This is why I think it should propagate out to the extensions.
 
@IMSoP I think that becomes a perf question. Eg, if you have some kind of run-before attribute on a method, you don't want the "look for attributes" logic to run on every single method call if you can avoid it, since presumably only 1/1000th of methods will have such an attribute.
 
@IMSoP Implementing something like #[Deprecated] in an extension is difficult. An observer could modify the ce, fn_flags, etc. when the attribute is attached.
 
@Trowski only if those flags had meaning somewhere else, surely?
 
3:50 PM
True, Deprecated is a narrow use-case because the flags being attached already have meaning.
 
i.e. the actual meat of the extension would still need to be in a hook for "a function has been executed", not "a function has been defined"
you could modify all hooks to have a conditional registration, like "hook function calls, but only if the function has this attribute"
but I'm not sure that saves much over a guard at the top of the callback to return immediately if it doesn't
 
I mean, as a matter of fact, attributes are more or less useless to extensions until they are inheritable, and if they become inheritable without hooks, they remain 95% as useless ...
 
@IMSoP Nah, not really. Sounds like the existing observers can handle attribute hooks quite nicely.
 
@JoeWatkins you keep saying that, and keep ignoring my examples of exactly how they could be used
 
I actually write extensions
 
3:54 PM
and those extensions can't have if statements in them, because....?
literally any case where you could have a run-time setting that took a list of class or function names could be modified in about 5 minutes to support configuring the same thing via attributes
 
except that the arguments are parsed, they don't provide much more capability than doc blocks did before them to an extension, you still have to hook and change in the engine in exactly the same ways as you did ... and how many extensions used docblocks ?
 
yes, that's all they are - the same thing people hacked into docblocks, but with native parsing
if you thought they were more than that, you've been mis-sold
they're exactly as useful to extensions as they are to userland code
 
that's not what the API advertises
 
you mean the hook for telling the user they typed the attribute wrong?
 
they are supposed to be useful to extensions
 
3:58 PM
1 min ago, by IMSoP
they're exactly as useful to extensions as they are to userland code
 
they're supposed to be useful for internals, they're supposed to be useful generally ...
I'm bored of this conversation ...
 
so am I
clearly, people do find them useful, because they've been using them for years even though the language didn't support them
 
@Trowski having had 5 minutes to think, don't use observers for attribute things ... by-default-enabled-observers is a hard pill to swallow, and would make it hard to do stuff with attributes for internals ...
 
Other build types are also less useful if everything isn't build with the sanitizer, like asan.
 
@JoeWatkins The function observer API provides enough of a hook for extensions to use attributes I think.
 
4:08 PM
@JoeWatkins phalcon is the only extension that i know of using annotations/attributes ( e.g: docs.phalcon.io/4.0/en/annotations#annotations )
 
you still have to discover for yourself what attributes should apply to a function because you can't tell the attribute api to inherit them ... sure you can hack something together that uses attributes, but it wouldn't look any different to something you hacked together to use doc blocks ...
and nobody does that ... nothing changed ...
 
morns
 
@JoeWatkins well, it would look a lot shorter, because you wouldn't need to parse the docblock; if you didn't care about inheritance, which in a lot of cases you don't, it would just be a "hash contains key" on the attributes of the function you were looking at
 
You can also jump back to the parent ce and check there, no?
 
you could have done the same with docblocks
 
4:13 PM
yes; literally everything you can do with attributes you could have done with docblocks
> The wide spread use of userland doc-comment parsing shows that this is a highly demanded feature by the community.
putting them in docblocks was always a hack, now we have native syntax which is less of a hack
 
to me it's not a win, if the thing you end up with looks like it would have if you were using doc blocks 5 years ago, and you would have never ever used docblocks for that thing ... it makes attributes as suitable as docblocks for anything, and docblocks are suitable for nothing ...
 
however many thousand developers use them with Doctrine, Symfony, etc would presumably beg to differ
 
Tens if not hundreds of thousands
 
Y'all are talking past each other again.
 
I very specifically mean, as an extension developer
 
4:19 PM
like I say, the use case I see is any extension that takes a whitelist or blacklist of classes or functions to attach to
 
Could attributes be made inheritable with a flag, or is that difficult to implement?
 
ask @beberlei
 
@Trowski I think it's difficult because they're not resolved to classes until needed; so at the time the child class is declared, the parent class's attributes are just strings, not class entries
 
@IMSoP Yes, I see now that a zend_attribute isn't what I initially thought.
I was expecting a zend_object and some other metadata.
 
I finally have my first elephpant \o/
 
4:28 PM
yay! 🐘🐘🐘
 
4:58 PM
@Trowski no they can't, because right now when you have an attribute on an element, the corresponding class of that attribute where #[Attribute(flags)] is on is not autoloaded. as such the flags are not known at the compile and inheritance step
attributes are also hybrids as in they don't need a class that backs them, it is optional
 
@beberlei It appears the TARGET_* flags are known at compile time to validate the target.
 
5:16 PM
But the parent ce isn't necessarily loaded, so there goes that idea.
And I guess I was wrong about the target flags too, boo! :P
@beberlei Technically I guess, though don't call newInstance then.
 
5:31 PM
@Trowski no the TARGET_ flags are not known at compile time, they are validated at ReflectionAttribute::newInstance time
ah i should read all messages :D
 
@beberlei Yeah, I realized that a little later :)
Obviously I haven't really played with attributes much before today.
 
I am wanting to run gcov for Xdebug 's phpt tests - is there a like a guideline, or example, on how to do that?
 
5:54 PM
Anyone here watch baseball? I don't really other than highlights and maybe the playoffs if there is nothing else... but I thought this was interesting. Did not know baseball had so many nuances likes this. youtu.be/SaW5B2SEnXg
 
@JoeWatkins Thanks, but I can't seem to get it to create .gcda files
 
6:18 PM
krakjoe@Fiji:/opt/src/xdebug$ ls .libs
xdebug.gcda  xdebug.la  xdebug.lai  xdebug.o  xdebug.so
 
uh how did you manage that?
 
Hey people what's up
 
@Derick rather a lot of pissing about, I can't get a test run to complete though still missing gcno
make clean
CCACHE_DISABLE=1 EXTRA_CFLAGS="-fprofile-arcs -ftest-coverage" make
put the full path to the new xdebug.so inside of .libs directory in php.ini
then run tests and it should create the files in the .libs directory
 
i think it's the last step that's the issue
 
6:33 PM
@JoeWatkins i have added few tests github.com/krakjoe/php-src/pull/3, should i use for syntax instead since that's what you initially used?
 
i get a gcda file now, but it doesn't really have anything in it...
instead of your -fprofi... I have --coverage, which should also do this
 
ah, got it now I think
@JoeWatkins Thanks for the pointers
 
7:05 PM
@StatikStasis these are some real weird hockey sticks they wave around
 
Does 8 allows for private methods in interfaces ?
 
short answer no
achh shame :/
 
how would you use it?
 
My API needs some internal communication these methods must not be public
protected and abstract classes is the workaround I guess
 
7:13 PM
but if it's public, then people can extend the abstract class
 
yet I will have to state that everything must be an instance of that abstract class, crippling it
 
*SEALED CLASSES PROMO*

but with sealed classes, you can seal your abstract class, where no one can extend it!
 
so can you with final
in java 9 you can have private methods in interfaces if I remember correctly
 
what is a sealed class tho
 
Kind of reminds me of the discussion of dave random and joe API vs ABI from the past days
 
7:17 PM
@FélixGagnon-Grenier wiki.php.net/rfc/sealed_classes
 
I can feel that the problem relates
 
I agree seald is cool but it's a bit far off from my problem
Unless I can check that the call is being made internally ...
 
don't think so, you could effectively keep doing the same as of now, but seal the abstract class to your implementations.

but i can see a use case for private methods in interfaces
 
7:37 PM
Package visibility!
 
also another possible usage
 
what's a package
 
A thing we don't have yet. :-)
 
available to a namespace but not globally
i.e: you can only use it inside namespace X but not in namespace Y
 
Assuming we build packages on a namespace basis.
 
7:39 PM
well
wouldnt the implementation of it be just a visibility keyword within a namespace
 
plot twist, namespaces are not real, they are just a string that gets added as a prefix to the class name.
 
hmm what to do what to do with my stuff
 
for now, add @internal to your abstract class and pray no one extends it 😛
 
The state of the art in PHP today for "this method is public, but if you're not this one other class, please don't use it" is to put that sentence in the docblock and tag it with @internal.
 
@Crell hmmm, if sealed classes RFC gets accepted, maybe we could have sealed methods 🤔
 
7:42 PM
I've decided that I agree with those that argue that class-level visibility control is a mistake. The class is not the right level for that. The package is.
 
```
class foo {
public sealed function bar(): int
permits baz {
// baz is the only class allowed to use it
}
}
```
actually, never mind, it looks ugly
 
But that was a mistake made in the late 80s, which Java in the 90s adopted and now can't get rid of, and PHP adopted from Java in the 2000s and now can't get rid of. But Go, Rust, Swift, and other more recent languages didn't have to maintain BC with that mistake, so they didn't.
 
@Crell you mean stuff like private class Foo {}?
 
That is one way of implementing it, yes.
 
yea, not a fan of that either
but determine what is a package, is not easy
 
7:50 PM
Why not? Not as a substitute for Sealed classes, it's a totally different problem space.
 
anything under a unique identifier
 
@Crell i know, but i would rather be able to declare part of the package as private to only this package only
 
That.. is exactly what package visibility is about.
 
^ exactly
 
"This class/property/whatever can be used only by cod in this package."
Even Javascript has this now. :-)
 
7:52 PM
but that might be just me, i usually declare internal stuff under Foo\Internal` namespace, so being able to declare everything in there as accessible to only Foo` is better than having to declare everything in Foo\Internal` using private` keyword
 
public namespace Body;

private namespace Body\PrivatePart;
nasty
xD
 
But it would allow a TON more freedom to have classes that you know are not part of your API, or classes that have public properties because you know that all users of it are just these classes in your own package, etc.
 
again, finding an answer to "what is a package" is the first challenge.
 
Yes, and where it usually gets hung up.
 
Anything under a unique identifier ?
Group of things under a unique identifier if you want to add extra clarity
namespaces themselves are a group of things
regarding using something as package .... that's a hierarchy discussion and I don't think it should go further above namespace
 
7:55 PM
My current thinking (as in, brainstorming without any thought of implementation, so take with a whole salt shaker), is to make package another class-like construct, defined in a file. Then a given file can, in addition to a namespace, declare I'm in package Crell\Stuff. Then you can have a package visibility modifier, and potentially a package can define other stuff in the package construct, like strict types, editions, etc, that will apply to everything in that package.
 
i would want FooBundle\Mapper\InternalMapper to be accessible in Foo\FooBundle\Controller\MappingController, even the their under different namespaces, but part of the same package
 
Again, the problem with anything namespace related is that namespaces don't exist.
 
any idea why stream_is_local returns false on data:// paths? wondering about the rationale -- 3v4l.org/C57G5
 
even if they are made into a thing ...
 
At runtime, it would be "the class name str_starts_with()" at best.
 
7:56 PM
internally perhaps the distinction could be made for them to exist, but externally I'd say namespaces are a well settled concept
 
@hakre stream_is_local is stream_is_part_of_the_local_filesystem :p
 
Once again, how internals conceptualizes something and how userspace conceptualizes it do not have anything to do with each other. :-)
 
data is a memory stream
 
@SaifEddinGmati so basically only file:// ?
actually makes sense, I wanted to prevent writing a file, so yeah, its not local ^^ :D
 
@hakre not sure really, maybe phar:// as well?
 
7:58 PM
let me test.
 
00:00 - 20:0020:00 - 00:00

« first day (3847 days earlier)      last day (1101 days later) »