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

StreamWrapper full support missing #275

Open
unusorin opened this issue Apr 9, 2014 · 7 comments
Open

StreamWrapper full support missing #275

unusorin opened this issue Apr 9, 2014 · 7 comments
Assignees

Comments

@unusorin
Copy link

unusorin commented Apr 9, 2014

Hi guys,
I've encountered a problem with Gauffrete StreamWrapper. It seems that dir_open (http://www.php.net/manual/en/streamwrapper.dir-opendir.php) method wasn't implemented. This causes calls like is_dir and scandir to crash.

Case:

$map = \Gaufrette\StreamWrapper::getFilesystemMap();
$map->set('vendor', new \Gaufrette\Filesystem(new \Gaufrette\Adapter\Local(__DIR__ . DIRECTORY_SEPARATOR . 'vendor/')));

\Gaufrette\StreamWrapper::register();

var_dump(scandir('gaufrette://vendor/'));

Output:

PHP Warning:  scandir(gaufrette://vendor/): failed to open dir: "Gaufrette\StreamWrapper::dir_opendir" call failed in test.sandbox.php on line 59

Environment:

OS: Ubuntu 12.04 x64
PHP Version: PHP 5.5.9-1+sury.org~precise+1 (cli) (built: Feb 13 2014 15:53:53) 
                      Copyright (c) 1997-2014 The PHP Group
                      Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
                      with Zend OPcache v7.0.3, Copyright (c) 1999-2014, by Zend Technologies
                      with Xdebug v2.2.3, Copyright (c) 2002-2013, by Derick Rethans
 Gaufrette: dev-master

Thanks,
Sorin!

@unusorin unusorin changed the title SteamWrapper full support missing StreamWrapper full support missing Apr 9, 2014
@wachterjohannes
Copy link

@unusorin i have the same issue!

@zartdinov
Copy link

Warning: stream_set_blocking(): Gaufrette\StreamWrapper::stream_set_option is not implemented!

@apsylone
Copy link

Same here !

@Baachi
Copy link
Contributor

Baachi commented Oct 6, 2015

Gaufrette only support file actions. You can't create/scan/unlink a folder with the streamwrapper.

@unusorin
Copy link
Author

unusorin commented Oct 6, 2015

Is this an official answer ?

@Baachi
Copy link
Contributor

Baachi commented Oct 6, 2015

This is the current state, you can change it with a PR 😄

@rimas-kudelis
Copy link

Gaufrette only support file actions. You can't create/scan/unlink a folder with the streamwrapper.

Not even all file actions are supported. rename(), for instance, is not.

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

No branches or pull requests

7 participants