Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: updated the layer version of php #76

Closed
wants to merge 1 commit into from

Conversation

SanthoshSiddegowda
Copy link

Issue:
By default, we are configuration copied from this file path, when I run the php artisan vendor:publish --tag=serverless-config and deploy I am getting this below error

{"message":"Internal Server Error"}

Reason :
As I checked the cloud watch log, I found below issue

Fatal error: Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.1.0". You are running 8.0.24. in /var/task/vendor/composer/platform_check.php on line 24  


Fix:
Updated the layer to php-81-fpm from php-80-fpm to support current laravel version dependencies

Attachments:
Screenshot 2022-10-28 at 12 56 22 PM
Screenshot 2022-10-28 at 12 56 40 PM

@mnapoli
Copy link
Member

mnapoli commented Oct 28, 2022

Thanks! I'm not sure we want to upgrade all projects to PHP 8.1 by default 🤔

Most users are still on PHP 8.0: https://packagist.org/packages/bref/laravel-bridge/php-stats#1

Is the latest version of Laravel PHP 8.1 only?

@SanthoshSiddegowda
Copy link
Author

@mnapoli Apologies, There is a misunderstanding on my end

In my local setup, the PHP version is 8.1

PHP 8.1.11 (cli) (built: Sep 29 2022 20:02:53) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.11, Copyright (c) Zend Technologies
with Zend OPcache v8.1.11, Copyright (c), by Zend Technologies

Since I am using composer(v2), we have Platform Check. so basically while making serverless files I unknowingly made the minimum version 8.1,

So technically, the layer version should be identical to the PHP version of which you are using

Since most of the users are still in PHP 8.0 no need for any change.

Closing the PR

Reference:
https://php.watch/articles/composer-platform-check

Also useful:
composer/composer#10282
composer/composer#10282

@mnapoli
Copy link
Member

mnapoli commented Oct 28, 2022

Got it, thanks for the details!

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

Successfully merging this pull request may close these issues.

None yet

2 participants