[PHP-DEV] Using a cross-platform glob implementation on all platforms

Hi internals,

Following some discussion in [GH-15564] about providing a cross-platform
glob implementation, I've done the work to make the implementation used
on Windows (which is from OpenBSD) the default on all platforms. You can
see it at [GH-18164]. CI is currently passing with this.

The code change is pretty minimal beyond cleanup. There are some things
that might need to be changed (i.e. if we want to support system glob
implementations), but those can be put off the table. It does simplify
some documentation concerns as well. I raise the question to internals
to see if this should be done or if it's big enough to merit an RFC.

Regards,
Calvin

[GH-18164]: Use win32 glob implementation on all platforms by NattyNarwhal · Pull Request #18164 · php/php-src · GitHub
[GH-15564]: Refactor `glob.c` to be Windows specific by Girgias · Pull Request #15564 · php/php-src · GitHub

-----Original Message-----
From: Calvin Buckley <calvin@cmpct.info>
Sent: Thursday, March 27, 2025 11:19 PM
To: php internals <internals@lists.php.net>
Subject: [PHP-DEV] Using a cross-platform glob implementation on all
platforms

CI is currently passing with this.

Hi,

It looks like you didn't have to adjust any tests. Can you clarify if there
are any observable behaviour changes that you're aware of?

BR,
Juris

Hi

Am 2025-03-27 22:18, schrieb Calvin Buckley:

The code change is pretty minimal beyond cleanup. There are some things
that might need to be changed (i.e. if we want to support system glob
implementations), but those can be put off the table. It does simplify
some documentation concerns as well. I raise the question to internals
to see if this should be done or if it's big enough to merit an RFC.

I've been bitten in the past by `glob()` behaving differently on Solaris than it does on GNU/Linux (GLOB_BRACE missing on Solaris), so I am in favor of unifying the behavior.

As far as I understand the PR, there is no breaking change, the proposed implementation is the “most featureful” of all of the supported platforms? Then I don't think this requires an RFC.

Best regards
Tim Düsterhus