psl
psl copied to clipboard
OSX: `Filesystem\create_temporary_file(Env\temp_dir()))` not equivalent to `\tempnam(\sys_get_temp_dir())`
Describe the bug Not a bug as such, but it caused a failure on my testsuite so thought you might want to know about it:
on OSX (or any system where sys_get_temp_dir()
is a symlink: Filesystem\create_temporary_file(Env\temp_dir()))
not equivalent to \tempnam(\sys_get_temp_dir())
.
Filesystem\create_temporary_file(Env\temp_dir()))
will return /var/folders/c9/etc...
\tempnam(\sys_get_temp_dir())
will return /private/var/folders/c9/etc...
because /var/
is a symlink to /private/var
Expected behavior Not sure really, just FYI.
Environment (please complete the following information):
- OS: OSX
- PHP version 8.0
so it seems tempnam
resolves symlink, while Filesystem\create_temporary_file doesn't.
Not sure if we should 🤔 currently create_temporary_file
doesn't use tempnam
, and i don't really see a gain from using it.
yep exactly :)
could call Filesystem\canonicalize(...)
on the result