Add PHP 7.1 as a kind (#2415)
* Implement PHP 7.1 kind
* Add tests for PHP 7.1 action
* Add PHP action documentation
Build the Docker container from php:7.1-alpine and implement the HTTP
server using PHP's built in server.
Note that when using a zip file, the router requires that the `main`
function is stored in `index.php`.
Note about the runner:
The runner sets the exit code to 1 if it has set the last line of stdout
to a string suitable for presentation to the user. Therefore, if the
exit code is not one, then display a generic message.
If there's a runtime error in the action (i.e. not spotted by linter),
then looking for the main() function will find it. Render the error to
the logs so that the user knows what's happened.
Note about vendor folder in a PHP zip:
If the PHP vendor file has a vendor directory, then this directory needs
to be used rather than the one supplied in the action container.
To do this, we require src/vendor/autoload.php which will exist if the
zip file contains it. For the two cases where (1) zip file does not contain a
vendor folder, or (2) when running a non-binary code action, we move the
container's vendor folder into src/.
7 files changed