openfaas / templates

OpenFaaS Classic templates
https://www.openfaas.com
MIT License
281 stars 227 forks source link

Template for PHP 8.1 (as 7.4 end of life will be 28 Nov 2022) #293

Closed meacu1pa closed 2 years ago

meacu1pa commented 2 years ago

Since PHP 7.4's active support ended 28 Nov 2021 and security fixes will only be applied until 28 Nov 2022 it would be nice to have a php 8.1 template.

Expected Behaviour

There is a PHP 8.1 template available

Current Behaviour

There is only a PHP 7.4 template available.

Are you a GitHub Sponsor (Yes/No?)

I bought the faasd eBook

Check at: https://github.com/sponsors/openfaas

List All Possible Solutions and Workarounds

There's no real "workaround" here.

Which Solution Do You Recommend?

Deprecate the PHP 7 template, as official support for this version will end 28 Nov 2022, see https://www.php.net/supported-versions.php for reference. Provide a PHP 8.1 template

Context

I'm trying to build functions with the most recent PHP version, as it is relevant for frameworks like Symfony to use a modern and supported PHP version.

meacu1pa commented 2 years ago

Working on this contribution here.

Still need to give it a test drive before creating a PR.

alexellis commented 2 years ago

Thanks for working on this, we'd welcome a PR for a "php8" template into this repository.

meacu1pa commented 2 years ago

Php 8.1 template builds nicely, there's only one little blocker right now:

The examples for extensions in php-extension.sh-example include installing Phalcon, which currently has no PHP 8 support. This means when using the extension-example with the phalcon part results in the build breaking.

@alexellis would it be sufficient to just remove the Phalcon part and update the extension documentation accordingly?

Or do a lot of users need this extension example and we should wait until Phalcon has php8 support?