Using Gaufrette Stream Wrappers with AsseticBundle Using Gaufrette Stream Wrappers with AsseticBundle php php

Using Gaufrette Stream Wrappers with AsseticBundle


I was having the same issue hooking up an Amazon S3 stream wrapper.

My final solution was to comment out the call to mkdir() and the check of it's return value Assetic's DumpCommand.

private function doDump(AssetInterface $asset, OutputInterface $stdout){    // ...    //if (false === @mkdir($dir, 0777, true)) {    //    throw new \RuntimeException('Unable to create directory '.$dir);    //}    // ...}

If you're using a dependency manager, copy the command into a new command class, comment out the necessary lines.

I think any directories/resources that don't exist in the path are created automatically.

Example:Directory has an assets folder that is empty.Pushing to s3://bucket-name/assets/css/style.css will create the css folder and style.css file.