aws / elastic-beanstalk-roadmap

AWS Elastic Beanstalk roadmap
https://aws.amazon.com/elasticbeanstalk/
Creative Commons Attribution Share Alike 4.0 International
283 stars 11 forks source link

PHP 8.1 support #214

Closed IonBazan closed 2 years ago

IonBazan commented 2 years ago

Community Note

Tell us about your request What do you want us to build?

PHP 8.1 has officially been released on 25 November 2021, yay! Here are the changes and features introduced in this release: https://www.php.net/releases/8.1/en.php. It would be great to see it supported natively by Elastic Beanstalk.

Are you currently working around this issue?

Staying on PHP 8.0 or installing the 8.1 manually during startup.

faizanakram99 commented 2 years ago

I had suggested earlier too that AWS should start working on new PHP version support while it is in beta state, now again we have a new stable PHP version (released one month ago) and there is no news to be seen about PHP 8.1 support.

https://github.com/aws/elastic-beanstalk-roadmap/issues/131#issuecomment-749805846

misyaath commented 2 years ago

And also in code build i could not build Laravel 9 because its needed 8.0.2 minimum version Please update the version and also i cannot update the version of php in code build environment when i install it dose not update php version

kloining commented 2 years ago

@misyaath Take a look at PHP platform history By using the latest platform, Elastic Beanstalk runs on 8.0.13

nickdnk commented 2 years ago

Guys, come on. Assigning one person to making sure you have the most recent version of PHP available to your customers can't possibly be this hard.

With all due respect, why does this take so long? You've also sometimes been up to 6 months behind on security updates for PHP versions you claim to support (7.4 and 8.0 for instance). That's borderline negligent.

ghost commented 2 years ago

This is so careless of aws beanstalk team. Such a shame

Ciaro commented 2 years ago

nickdnk pretty much nailed it with his comment...

nickdnk commented 2 years ago

What's the argument here, @devfrey and @axlon? Do you think this is all good or what? Why the downvotes?

axlon commented 2 years ago

@nickdnk Because these last few comments add nothing to this thread, regardless of if I agree with them or not. I am subscribed to this thread so that I'd get notified when they finally do decide to address this, but instead every time a notification does pop up its just more of the same.

Regardless, no hard feelings, I think we all want the same thing here.

nickdnk commented 2 years ago

@axlon That's fair, but you must also recognize that more complaints about this (and upvotes on the original post don't really generate any noise) should lead to a shift in priority within AWS, despite the fact that they claim it does not. It's not even on the roadmap yet or being responded to, even after 4 months and 120+ upvotes, which is ridiculous, to be quite honest.

zainspresso commented 2 years ago

For the time being I just do the update myself: It is ridiculous how long this takes..

commands:
  00_upgrade_php:
    command: |
      sudo yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
      sudo yum -y install https://rpms.remirepo.net/enterprise/remi-release-7.rpm
      sudo yum -y install yum-utils
      sudo yum -y install rpl
      export LC_ALL=en_US.UTF-8
      export LANG=en_US.UTF-8
      sudo yum-config-manager --disable 'remi-php*'
      sudo yum-config-manager --enable remi-php81
      rpl [remi-php81] "[remi-php81]\npriority=1" /etc/yum.repos.d/remi-php81.repo -e
      yum upgrade -y php php-*
    test: test ! -f .semaphore
  01_lock:
    command: touch .semaphore
wattsie commented 2 years ago

Hi all, I was able to get the code build process working using similar by changing the following...

You simply need to remove or disable phpenv, then install a newer php with curl and xml then all proceeds as expected.

PS: you maybe able to just upgrade to 8.0.13, I just went straight to 8.1.

PPS: also need to change "SolutionStackName" to "64bit Amazon Linux 2 v3.3.11 running PHP 8.0"

Cheers.

buildspec.yml

version: 0.2

phases:
  install:
    runtime-versions:
      php: 8.0
    commands:
      - rm -rf $(phpenv root)
      - add-apt-repository ppa:ondrej/php
      - apt-get update
      - apt-get install php8.1 php8.1-xml php8.1-curl -y
      - composer update
  build:
    commands:
      - rm -rf /var/app/current/public/storage
      - php artisan storage:link --force
  post_build:
    commands:
      - aws cloudformation package --template template.yml --s3-bucket $S3_BUCKET --output-template-file template-export.yml

      # Do not remove this statement. This command is required for AWS CodeStar projects.
      # Update the AWS Partition, AWS Region, account ID and project ID in the project ARN on template-configuration.json file so AWS CloudFormation can tag project resources.
      - sed -i.bak 's/\$PARTITION\$/'${PARTITION}'/g;s/\$AWS_REGION\$/'${AWS_REGION}'/g;s/\$ACCOUNT_ID\$/'${ACCOUNT_ID}'/g;s/\$PROJECT_ID\$/'${PROJECT_ID}'/g' template-configuration.json
artifacts:
  files:
    - template-export.yml
    - template-configuration.json
vantezzen commented 2 years ago

I've had some problems when using zainspresso's script while also using ImageMagick as there were some dependency conflicts during the upgrade.

I'm now using this under "/.ebextensions/00_upgrade_php.config" if anyone has the same problem:

commands:
  00_upgrade_php:
    command: |
      if [ `php -r "echo version_compare(PHP_VERSION, '8.1.0') >= 0;"` = 1 ]
      then
        echo "PHP already up-to-date"
      else
        sudo yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
        sudo yum -y install https://rpms.remirepo.net/enterprise/remi-release-7.rpm
        sudo yum -y install yum-utils
        sudo yum -y install rpl
        sudo yum-config-manager --setopt=remi.priority=1 --save
        # Reinstall ImageMagick from remi to prevent dependency conflicts
        sudo yum -y remove ImageMagick
        sudo yum -y install ImageMagick
        export LC_ALL=en_US.UTF-8
        export LANG=en_US.UTF-8
        sudo yum-config-manager --disable 'remi-php*'
        sudo yum-config-manager --enable remi-php81
        rpl [remi-php81] "[remi-php81]\npriority=1" /etc/yum.repos.d/remi-php81.repo -e
        yum upgrade -y php php-*
      fi
    test: test ! -f .semaphore
  01_lock:
    command: touch .semaphore
juizmill commented 2 years ago

It should have the latest version no later than a week after the official release.

blaater6 commented 2 years ago

Almost half a year after the release of php 8.1 I'm really eager to use this on AWS. Maybe the maintainers can prioritise this issue so maybe we will have php 8.1 support when php 8.2 comes out.

netadapt commented 2 years ago

Almost half a year after the release of php 8.1 I'm really eager to use this on AWS. Maybe the maintainers can prioritise this issue so maybe we will have php 8.1 support when php 8.2 comes out.

8.0 was available on Extras so promptly it set the expectation for quick availability of 8.1 too. So this delay is baffling - I'm just pleased to have some update at all after all this time. Those enums hopefully won't stay out of reach for much longer...

TZwakhals commented 2 years ago

@blaater6 Indeed, our project is kinda held back by the need for this update

jordanade commented 2 years ago

I want to reiterate that it's not just the major/minor upgrades that are delayed. The patch versions aren't getting updated either. Still on PHP 8.0.16 when 8.0.19 is out. There's a bug that's affecting us that's fixed in 8.0.17!

RahulDey12 commented 2 years ago

Is there any update? what is happening AWS all other Linux distros already gave the update for PHP 8.1 but you guys are in AWS getting money from our bills and should have some responsibilities for their customers for providing the best support. When you guys are trying to promote your Amazon Linux 2, then why delay on PHP update when 7 out of 10 websites are made with PHP.

KazakovVS commented 2 years ago

Why does it take so long to support PHP 8.1?

VaguelyOnline commented 2 years ago

What is the hold up here?

jdempster commented 2 years ago

Also waiting. Would be good to get an update on when it’s happening

winkelco commented 2 years ago

how many years of work does aws need for this?

KZeni commented 2 years ago

Just a heads up, PHP 8.2 Alpha is out for testing as of today and yet this is still waiting to have 8.1 made available (with 8.1.7 being the current version now.)

Meanwhile, it's taken long enough that the bigger thing at this point is how https://www.php.net/supported-versions is showing version 8.0.x is losing active support in 5 months (we're past the halfway point from the official release and it losing active support) while this isn't offering any newer version than that to use/migrate to in order to stay with a version that has active support. Sure, it will have security support for a year after that, but this really should be offering what's recommended (has active support) and allow migration time for existing things and/or allow for the newest version to be used for new things. At the very least, 8.1 really should be made available sooner than later so those looking to use an actively supported PHP version have time to migrate, test, etc. before then.

jordanade commented 2 years ago

@KZeni What good is "security support" when we don't even get the patch upgrades?? Elastic beanstalk is a joke, I guess we should all be transitioning to Docker...which would also make it easier to dump AWS entirely and move to a different cloud provider.

KZeni commented 2 years ago

@jordanade I mean, https://docs.aws.amazon.com/elasticbeanstalk/latest/platforms/platform-history-php.html does show the PHP 8.0.x version has been getting updated over the past months (8.0.8 in July 2021, 8.0.13 in February 2022, 8.0.16 in April 2022, etc.) Those versions look to lag a few months behind their release when it comes to them being made available, but at least they're getting updated. It then just seems odd that 8.1.x is entirely missing at this point & isn't just a few months behind.

sebastianpuka310 commented 2 years ago

We are also waiting for Elastic Beanstalk support for PHP 8.1. This is affecting our applications and holding them back. It would be good if we have an ETA when that would be available ? We hope it is not going to take long.

ishu202 commented 2 years ago

same here i was going to deploy symphony 6.1 but had to rollback to symphony 6.0.9. not a big thing but missing out alot of optimizations and bug fixes.

adamwinn commented 2 years ago

The irony here is that if you add "aws/aws-sdk-php": "3.*" to your composer file, you will get an error

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

So now you can't even use AWS's own PHP SDK with your PHP app because beanstalk hasn't been updated to support PHP 8.1

girayk commented 2 years ago

PHP 8.2 Alpha is out, almost 8.2 is coming and we are still waiting for 8.1

Nilanth commented 2 years ago

We are waiting for this release to update some predominant dependencies in our app. Kindly update the ETA.

ishu202 commented 2 years ago

here is the solution i ended up with. i containerized my app using docker. and was still able to use RDS and other services. I could share my config if anyone is interested. let me know.

faizanakram99 commented 2 years ago

here is the solution i ended up with. i containerized my app using docker. and was still able to use RDS and other services. I could share my config if anyone is interested. let me know.

sure, go ahead

jasonpeltzer commented 2 years ago

Any status on this would be greatly appreciated, this is holding up our ability to move to Symfony 6.1! Not to mention the lack of enums. Oh yeah, and 8.2 is set for release!

faizanakram99 commented 2 years ago

@devfrey you seem to have a lot of time to downvote each comment.

andyexeter commented 2 years ago

Happy to see that this has been moved to Coming Soon on the roadmap!

@devfrey please downvote this comment so I don't feel left out :)

jordanade commented 2 years ago

Happy to see that this has been moved to Coming Soon on the roadmap!

Yeah, now we just have to "think a couple of months out, give or take"...

nickdnk commented 2 years ago

I have created an issue for PHP 8.2. We might as well get the ball rolling on that (given that its release date is closer than the current delay on 8.1) so we can avoid this type of situation going forward. Go and upvote it to support it.

Here: https://github.com/aws/elastic-beanstalk-roadmap/issues/250

MarcoDeJong commented 2 years ago

Alt Text

g3luka commented 2 years ago

Hi guys,

I don't know if most of you use AWS services other than Beanstalk? I also use AWS Lambda and platform updates are released the same way. So, it's not exclusive to either Beanstalk or PHP, with Node.js the same thing happens.

CesarOsorioL commented 2 years ago

Hi guys

Could you give us a date or something to know when PHP 8.1 in Elastic Beanstalk will be available? This would be of great help, thank you.

dejagersh commented 2 years ago

Hi guys

Could you give us a date or something to know when PHP 8.1 in Elastic Beanstalk will be available? This would be of great help, thank you.

It's currently in status "Coming soon" since 23th of June.

PHP 8.0 moved into "Coming soon" on 27 feb 2021 and was released on 31 march 2021. Perhaps this is an indication as to how long it might still take :) About end of July.

afariasfermin commented 2 years ago

Any clue when this get deployed?

shadi1999 commented 2 years ago

Hello all

I did update my eb instance to PHP 8.1 manually using predeploy script

this is my file under ROOT/.platform/hooks/prebuild/02_my_commands.sh:

#!/usr/bin/env bash
sudo /usr/local/composer self-update 
sudo yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
sudo yum -y install https://rpms.remirepo.net/enterprise/remi-release-7.rpm
sudo yum -y install yum-utils
sudo yum -y install rpl
sudo yum-config-manager --setopt=remi.priority=1 --save
# Reinstall ImageMagick from remi to prevent dependency conflicts
sudo yum -y remove ImageMagick
sudo yum -y install ImageMagick
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
sudo yum-config-manager --disable 'remi-php*'
sudo yum-config-manager --enable remi-php81
rpl [remi-php81] "[remi-php81]" /etc/yum.repos.d/remi-php81.repo -e
sudo yum upgrade -y php php-*
sudo yum -y install php-zip libz-dev libzip-dev 
sudo yum -y install libzip-devel.x86_64
pecl install zlib zip 
sudo service httpd restart

it works fine with me and I hope that it could help you

ninjacoder96 commented 2 years ago

it is also the same with ec2 amazon linux extra , there's no php 8.1 under the hood only php 8.0. any update on this?

snabela commented 2 years ago

Yes please add support for 8.1 to ec2 amazon linux extras, as well as to codebuild

VaguelyOnline commented 2 years ago

This is getting ridiculous now.

dealer-solutions-gene commented 2 years ago

Just saw this today, 8.1 added!

image

(ap-southeast-2)

newadventure079 commented 2 years ago

Is there an easy way to upgrade to php 8.1 or do we have to create a new environment?

andyexeter commented 2 years ago

For those looking to upgrade an existing environment, this can be done via the AWS CLI.

WARNING: Don't run this on a production environment without testing! And don't blame me if it breaks something

aws elasticbeanstalk update-environment \
--solution-stack-name "64bit Amazon Linux 2 v3.4.0 running PHP 8.1" \
--environment-id "x-xxxxxxxxxx" \
--region "xx-xxxx-x"
ihor-sviziev commented 2 years ago

Do anyone know if the php 8.1 packages became available for regular ec2 instances?