Couldn't this just be:

```ruby
unless test "[ -e composer.phar ]"
  execute :curl, "-s", fetch(:composer_download_url), "|", :php
end
```