I may be being completely stupid, and there may be a better way to suggest edits to the drone docs than posting here… if so. please tell me how
The PHP language guide (https://docs.drone.io/examples/language/php/
) could I think, do with a bit more love.
My first addition is below, but if there’s interest, I’m happy to post a few more here as and when I do them / remember…
It currently includes references for phpunit (via composer), but there are other tools that those of us in the PHP world use.
The first one I’ve done is PHPCS (which is a code sniffer used for things like PSR2 style compliance.)
Here’s a sample .drone.yml file.
kind: pipeline
name: PSR2
steps:
- name: PSR2
image: herloct/phpcs
commands:- cp -r /drone/src/ /project
- phpcs --standard=PSR1,PSR2 --ignore=/vendor/ .
Obviously, you could just get phpcs to check the code in place rather than copy it to /project… but I do some other stuff as well for which having two copies is useful, which I’m not posting here, and the copy is so quick I’m leaving it in…