-
Notifications
You must be signed in to change notification settings - Fork 70
Support for mbstring, PDO MySql/Postgresql + PHP 7.2 and 7.3 #23
Conversation
PHP 7.2 and 7.3 support sounds great 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! My main feedback is around the multiple bootstrap files. Keeping one bootstrap file will make things much more maintainable in the future.
Thanks!
bootstrap-php73
Outdated
curl_close($ch); | ||
} | ||
|
||
?> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How different are these bootstraps from the current bootstrap file? Would it be better, where there are differences, to have one file that just uses the current PHP version (http://php.net/manual/en/function.phpversion.php)? It might look something like:
exec("PHP_INI_SCAN_DIR=/opt/etc/php-7." + PHP_MINOR_VERSION + ".d/:/var/task/php-7." + PHP_MINOR_VERSION
+ ".d/ php -S localhost:8000 -c /var/task/php.ini -d extension_dir=/opt/lib/php/modules '$HANDLER'");
or
if (PHP_MINOR_VERSION == 1) {
...
} else if (PHP_MINOR_VERSION == 2) {
...
} else {
...
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, and I can work on it. I could also merge build-php72.sh and build-php72.sh. I would leave build.sh apart, as it looks quite different.
php.ini
Outdated
;extension=xmlwriter.so | ||
;extension=xsl.so | ||
;extension=zip.so |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These php.ini files are only used for the bootstrap file. They are not used for function code. There's no need to show commented-out extensions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, I can remove them. The basic idea was to give a template for people creating functions to just copy this php.ini and uncomment the modules they need, rather than looking into the documentation. No problem to remove them, anyhow.
README.md
Outdated
|
||
And, if you're looking for a great way to build serverless apps of all kinds, be sure to check out [Stackery](https://stackery.io)! | ||
This project is fork of the [Stackery](https://stackery.io) [php-lambda-layer](https://github.com/stackery/php-lambda-layer) that has been modified to: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would need to be reverted :).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK.
|
||
**arn:aws:lambda:\<region\>:887080169480:layer:php71:6** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to prominently show the latest version of the layer that is publicly available. I'm happy to keep this up to date, but let's leave it here and expand further for more versions.
If you are interested just in (1), only copy changes to the build.sh file.
For (2), I have not updated the publish scripts yet.
You might want to change the README.md as you like.