-
Notifications
You must be signed in to change notification settings - Fork 7.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PharData archive created with Phar::Zip format does not keep files metadata (datetime) #10766
Comments
This issue is also valid for PHP 7.4, PHP 8.0 and PHP 8.1 |
I can confirm this on 8.1+ and I'll now try to debug this issue. |
…not keep files metadata (datetime) Due to an incorrect check, the datetime was never actually set. To test this we need to write the file using phar, but read the file using a different method to not get a cached, or a value that's been transformed twice and is therefore accidentally correct.
* PHP-8.1: Fix GH-10766: PharData archive created with Phar::Zip format does not keep files metadata (datetime)
* PHP-8.2: Fix GH-10766: PharData archive created with Phar::Zip format does not keep files metadata (datetime)
I see that PHP 8.2.4 and 8.1.17 have been released but without any fix about this issue, do you why? |
The fix is applied to those versions. |
Oh ok, I have not test it yet, but seeing the 8.2.4 and 8.1.17 branches on this very repository does not show any modification in file And your modification is:
|
@franck-paul Sorry I just realised something, I was testing on the latest 8.1 development build... |
You're welcome and thanks for confirming! |
I suspect that fixing this revealed a deeper bug in the timezone handling: #12532 |
Description
Having a file created this day (2023-03-03) named
myfile.txt
in/tmp
directory.The following code:
Resulted in this output (uncompress '/tmp/archive.zip' archive):
But I expected this output instead (uncompress '/tmp/archive.tar' archive):
PHP Version
PHP 8.2.0
Operating System
MacOS 13.2
The text was updated successfully, but these errors were encountered: