I am trying to use the Gaufrette Stream Wrapper to tell the AsseticBundle where to upload project assets, but I cannot recognize it.
This is what 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 checked the wrapper with a simple action to make sure it is registered correctly 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 an asset bundle configuration similar to this (in config_dev.yml too):
assetic: read_from: gaufrette://dev_adapter write_to: gaufrette://dev_adapter
However, when I try to dump 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]
Additional Information:
symfony / symfony: 2.5.0
symfony / assetic-bundle: 2.3.0
knplabs / knp-gaufrette-bundle: 0.1.7
php symfony assetic gaufrette
Marcel hernandez
source share