How to use bitbucket pipelines on a php application?

I have the following pipeline script which does execute but I get a java error. (Project Home must be an existing directory: /root/src)

Is there a better docker-image to use, or some instructions on building the sonar-scanner within the image the default image?

    - step:
        image: skilldlabs/sonar-scanner
        name: Sonarcloud
            - sonar-scanner

Any help would be appreciated.

Running analysis on a PHP project in Bitbucket Pipeline should be really easy. Please follow the instructions of the documentation ( and look at the sample project (the nodejs one) where you will see the following configuration for your pipe:

    - step: &build-test-sonarcloud
        name: Build, test and analyze on SonarCloud
          - sonar
          - pipe: sonarsource/sonarcloud-scan:0.1.5
              SONAR_TOKEN: ${SONAR_TOKEN}