Hi
On 2026-10-05 16:53, Nick Sdot wrote:
For the “always enabled” extensions it doesn't really matter *where*
the code is located and the (observable) end result for the user is
the same (except for `ReflectionExtension`). Time\Duration went into
ext/date for simplicity, since timelib is already properly wired into
ext/date.
It matters how code is organised. Patterns, assumptions, cognitive
load, these, that. I think that's important. A "doesn't really matter
*where*" approach is what brings code where core is.
I would find it more natural to look at the namespace `Time`, and find
an `ext/time`. Me getting confused in my last mail shows it nicely. My
mail was in draft since you opened the discussion, today I found time
to answer and whoops mixed up the polling follow up commit with where
things actually live. :)
For the vast majority of PHP developers the exact extension where the
code lives is not relevant - they likely don't even know that PHP’s
always-enabled standard library is split into multiple extensions, since
no action is required for it to be available. Accordingly the RFC also
leaves this unspecified as an implementation detail.
If "doesn't really matter *where*" stands, then it cannot hurt to
separate it. So: why _not_ doing it?
ext/date was the pragmatic choice to get things into PHP 8.6. Splitting
it out would likely also require a separate ext/timelib extension
(similar to ext/lexbor) that provides the underlying library for
internal use. Otherwise we would just move some files - that are already
entirely standalone - into a separate directory, but not actually do
anything meaningful to separate ext/time from ext/date.
Best regards
Tim Düsterhus