On 2026-06-11 03:24, Rowan Tommins [IMSoP] wrote:
Take Guzzle, for example; it has 43 source files within a specific namespace root. A
handful of those are marked "@internal", and a way for PHP to error if users
reference them directly would be useful. Some users end up wanting conflicting versions
of Guzzle simultaneously, e.g. in different WordPress plugins; so some way of isolating
or rewriting class names (and all their references) would be useful.
There are not 43 separate "modules", and the maintainers of Guzzle aren't going
to combine all of them into one file. Defining a single package with multiple files is
not a stretch goal, it's the only plausible starting point.
Just throwing this out, but couldn't the "module file" - the one that
users bring into their project and the one that exports what it's
declared to export - delegate the definitions of the functions etc. both
public and private to other files?
I mean, PHP already _has_ an "include" statement...