ok i tracked it down. seems the short version
```
 only_if ::File.exists?("#{new_resource.project_path}/composer.json")
```
doesn't work here. Inside a ruby block everything is fine: 
```
only_if do
  ::File.exists?("#{new_resource.project_path}/composer.json")
end
```
and of course this one is less cryptic ;-)