Skip to content
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 wrapper method stream_metadata is not implemented #3687

Closed
adlawson opened this issue Sep 6, 2014 · 1 comment
Closed

Stream wrapper method stream_metadata is not implemented #3687

adlawson opened this issue Sep 6, 2014 · 1 comment

Comments

@adlawson
Copy link

adlawson commented Sep 6, 2014

StreamWrapper::stream_metadata is not implemented, along with related STREAM_META_* constants like STREAM_META_TOUCH. These are needed for compatibility with Zend PHP 5.4.

A call to touch is tested on a user stream in https://github.com/facebook/hhvm/blob/master/hphp/test/slow/streams/stream_wrapper_register.php but the test expectation has been written to incorrectly pass.

The current expectation at line 108

string(10) "__destruct"
array(0) {
}
string(11) "__construct"
array(0) {
}

should read

string(10) "__destruct"
array(0) {
}
string(10) "stream_metadata"
array(3) {
  [0]=>
  string(7) "abc://g"
  [1]=>
  int(1)
  [2]=>
  array(0) {
  }
}
string(11) "__construct"
array(0) {
}

which will fail, as is the current behaviour.

Related issue: adlawson/php-vfs#10
Failed tests: https://travis-ci.org/adlawson/vfs.php/builds/34587848

hhvm-bot pushed a commit that referenced this issue Sep 17, 2014
Summary: #3687

When `touch(..)` is passed a path that denotes a user file, call `stream_metadata(..)` (if implemented) in the registered class.

Reviewed By: @ptarjan

Differential Revision: D1550205
rrh pushed a commit to newrelic-forks/hhvm that referenced this issue Sep 24, 2014
Summary: facebook#3687

When `touch(..)` is passed a path that denotes a user file, call `stream_metadata(..)` (if implemented) in the registered class.

Reviewed By: @ptarjan

Differential Revision: D1550205
kevinxucs added a commit to kevinxucs/hhvm that referenced this issue Oct 21, 2014
Part of facebook#3687. So far, only chown(..) in user-stream-wrapper has
been hooked with stream_metadata(..) function. Similar to commit
1f55a08.
@Majkl578
Copy link
Contributor

I've implemented this in #3897, it just needs some patience to go through.
Edit: Moved to separate PR: #4031.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants