I'm trying to use a Gaufrette Stream Wrapper to tell the AsseticBundle where to dump the project assets but I can't make it recognize them.
This is how the knp_gaufrette section of my config_dev.yml looks like:
knp_gaufrette:
adapters:
dev_adapter:
local:
directory: /vagrant/test
create: true
filesystems:
dev_adapter:
adapter: dev_adapter
stream_wrapper: ~
I tested the wrapper using a simple action to make sure that it is properly registered, and it works fine:
public function thanksAction()
{
file_put_contents('gaufrette://dev_adapter/test.txt', "ABC\n", FILE_APPEND);
return new Response(file_get_contents('gaufrette://dev_adapter/test.txt'));
}
Then I set up the assetic bundle configuration like this (in config_dev.yml too):
assetic:
read_from: gaufrette://dev_adapter
write_to: gaufrette://dev_adapter
However, when I try to dump the assets using console assetic:dump --env=dev
I get this error:
Dumping all dev assets.
Debug mode is on.
10:53:28 [dir+] gaufrette://dev_adapter/css
[RuntimeException]
Unable to create directory gaufrette://dev_adapter/css
assetic:dump [--watch] [--force] [--period="..."] [write_to]
Further information:
symfony/symfony: 2.5.0
symfony/assetic-bundle: 2.3.0
knplabs/knp-gaufrette-bundle: 0.1.7
-vvv
option in order to increase the verbosity of your error message. – Thymic