-
Notifications
You must be signed in to change notification settings - Fork 3k
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
stream_get_meta_data returns an empty uri for tmpfile() streams #2336
Comments
Simpler test case:
|
This isn't quite as trivial as it sounds - we use the c tmpfile() call which gives us an fd, not a filename. This is better ins ome ways (it removes a race condition), but makes it hard to implement this. |
It's possible but that will only work on Linux, using |
Yeah, tmpfile() resources don't necessarily have paths. On linux this seems to be commonly implemented by creating a file and immediately unlinking it (meaning the open file handle is the only reference to it), it literally doesn't have an entry on the file system. If you need a file path you really should use tempnam() and open/close/unlink the file explicitly. You could do something like the following (untested):
|
The assetic testsuite is currently failing 1 test on HHVM on Travis: https://travis-ci.org/kriswallsmith/assetic/jobs/22333581
When looking at the failure, I see that the command being executed has an empty argument for the
--flagfile
option. In the test, this option is set by getting the uri of a tmp file withstream_get_meta_data
. It looks like it returns an empty string in theuri
key instead of returning the path to the file created bytmpfile
.the code of the test is https://github.com/kriswallsmith/assetic/blob/master/tests/Assetic/Test/Filter/GoogleClosure/CompilerJarFilterTest.php#L105-112
The text was updated successfully, but these errors were encountered: