Update PHP docs to use `install` when appropriate

Installing dependencies with the `before_script` directive is possible, but doing it during the `install` phase is more appropriate.