[ErrorException] file_put_contents(./composer.json): failed to open stream: Permission denie d

Shell
sudo chown -R $USER ~/.composer/
Source

Also in Shell: