Skip to content

Commit b342712

Browse files
authored
Add layer for Symfony Runtime (#231)
* Add layer for Symfony Runtime * Adding fake test * Added docs
1 parent 87d2e9c commit b342712

5 files changed

Lines changed: 33 additions & 0 deletions

File tree

Readme.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ functions:
6464
| Redis | `${bref-extra:redis-php-74}` |
6565
| Scrypt | `${bref-extra:scrypt-php-74}` |
6666
| SPX | `${bref-extra:spx-php-74}` |
67+
| Symfony Runtime | `${bref-extra:symfony-runtime-php-74}`|
6768
| Microsoft SQLSRV | `${bref-extra:sqlsrv-php-74}` |
6869
| UUID | `${bref-extra:uuid-php-74}` |
6970
| Xdebug | `${bref-extra:xdebug-php-74}` |
@@ -106,6 +107,10 @@ There is more information about the driver ini configuration in the [snowflake c
106107
but the default configuration is enough in most cases.
107108
The easiest way review those is to download the [`snowflake_odbc` directory](https://sfc-repo.snowflakecomputing.com/odbc/linux/index.html).
108109

110+
### Symfony Runtime
111+
112+
Read [docs at runtime/bref](https://github.com/php-runtime/bref).
113+
109114
### SQL Server setup
110115

111116
The SQL Server layer includes both the SQLSRV extension and the PDO_SQLSRV extension ([source](https://github.com/microsoft/msphpsql)).

layers/symfony-runtime/Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Build the final image with just the files we need
2+
FROM scratch
3+
4+
COPY bootstrap /opt/bootstrap

layers/symfony-runtime/bootstrap

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/sh
2+
3+
# Fail on error
4+
set -e
5+
6+
LAMBDA_ARGV=(${_HANDLER//:/ })
7+
8+
while true
9+
do
10+
# We redirect stderr to stdout so that everything
11+
# written on the output ends up in Cloudwatch automatically
12+
/opt/bin/php "${LAMBDA_ARGV[0]}" 2>&1
13+
done

layers/symfony-runtime/config.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"php": [
3+
"73",
4+
"74",
5+
"80"
6+
]
7+
}

layers/symfony-runtime/test.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?php
2+
3+
// Always pass
4+
exit(0);

0 commit comments

Comments
 (0)