Skip to content
This repository was archived by the owner on Sep 8, 2021. It is now read-only.

Support for mbstring, PDO MySql/Postgresql + PHP 7.2 and 7.3 #23

Merged
merged 8 commits into from
Feb 6, 2019

Conversation

code-runner-2017
Copy link
Contributor

  1. Added support for mbstring and PDO (MySQL/Postgresql) in order to meet requirements of popular frameworks such as Lumen and Laravel;
  2. Added support for PHP 7.2 and 7.3 using the REMI RPM Repository.

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.

@ThomasRedstone
Copy link

PHP 7.2 and 7.3 support sounds great 👍

Copy link
Member

@txase txase left a 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);
}

?>
Copy link
Member

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 {
  ...
}

Copy link
Contributor Author

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
Copy link
Member

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.

Copy link
Contributor Author

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:
Copy link
Member

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 :).

Copy link
Contributor Author

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**
Copy link
Member

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants