Gaufrette
Gaufrette copied to clipboard
StreamWrapper full support missing
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 i have the same issue!
Warning: stream_set_blocking(): Gaufrette\StreamWrapper::stream_set_option is not implemented!
Same here !
Gaufrette only support file actions. You can't create/scan/unlink a folder with the streamwrapper.
Is this an official answer ?
This is the current state, you can change it with a PR :smile:
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.