diff --git a/Readme.md b/Readme.md index 0c4a896c..f5d57086 100644 --- a/Readme.md +++ b/Readme.md @@ -64,6 +64,7 @@ functions: | Redis | `${bref-extra:redis-php-74}` | | Scrypt | `${bref-extra:scrypt-php-74}` | | SPX | `${bref-extra:spx-php-74}` | +| Symfony Runtime | `${bref-extra:symfony-runtime-php-74}`| | Microsoft SQLSRV | `${bref-extra:sqlsrv-php-74}` | | UUID | `${bref-extra:uuid-php-74}` | | Xdebug | `${bref-extra:xdebug-php-74}` | @@ -106,6 +107,10 @@ There is more information about the driver ini configuration in the [snowflake c but the default configuration is enough in most cases. The easiest way review those is to download the [`snowflake_odbc` directory](https://sfc-repo.snowflakecomputing.com/odbc/linux/index.html). +### Symfony Runtime + +Read [docs at runtime/bref](https://github.com/php-runtime/bref). + ### SQL Server setup The SQL Server layer includes both the SQLSRV extension and the PDO_SQLSRV extension ([source](https://github.com/microsoft/msphpsql)). diff --git a/layers/symfony-runtime/Dockerfile b/layers/symfony-runtime/Dockerfile new file mode 100644 index 00000000..aff81afc --- /dev/null +++ b/layers/symfony-runtime/Dockerfile @@ -0,0 +1,4 @@ +# Build the final image with just the files we need +FROM scratch + +COPY bootstrap /opt/bootstrap diff --git a/layers/symfony-runtime/bootstrap b/layers/symfony-runtime/bootstrap new file mode 100644 index 00000000..67918852 --- /dev/null +++ b/layers/symfony-runtime/bootstrap @@ -0,0 +1,13 @@ +#!/bin/sh + +# Fail on error +set -e + +LAMBDA_ARGV=(${_HANDLER//:/ }) + +while true +do + # We redirect stderr to stdout so that everything + # written on the output ends up in Cloudwatch automatically + /opt/bin/php "${LAMBDA_ARGV[0]}" 2>&1 +done diff --git a/layers/symfony-runtime/config.json b/layers/symfony-runtime/config.json new file mode 100644 index 00000000..6abe3e86 --- /dev/null +++ b/layers/symfony-runtime/config.json @@ -0,0 +1,7 @@ +{ + "php": [ + "73", + "74", + "80" + ] +} diff --git a/layers/symfony-runtime/test.php b/layers/symfony-runtime/test.php new file mode 100644 index 00000000..1b3ac281 --- /dev/null +++ b/layers/symfony-runtime/test.php @@ -0,0 +1,4 @@ +