Skip to content

Cannot Install league/flysystem-aws-s3-v3 #4439

@Ipstenu

Description

@Ipstenu

PHP version: 8.3.6
FreeScout version: 1.8.160
Database: MySQL
Are you using CloudFlare: Yes
Are you using non-official modules: No

I was attempting to install AWS S3 for storage and I read the FAQ: https://github.com/freescout-help-desk/freescout/wiki/FAQ#how-can-attachments-be-stored-in-amazon-aws-s3

Per the laravel directions I ran composer require league/flysystem-aws-s3-v3 ~1.0 --ignore-platform-req=php (per https://github.com/freescout-help-desk/freescout/wiki/Development-Guide#github-workflow ) and everything seemed to work until I ran php /var/www/html/artisan freescout:clear-cache

Error occurred saving /storage/app/public/js/vars.js. Error: Implicit conversion from float 64917.10999989664 to int loses precision; File: /var/www/html/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php (143)

Now at first I thought it was related to a known issue in AWS ( guzzle/guzzle#3071 ) but when I ran composer why guzzlehttp/guzzle, I hit this:

aws/aws-sdk-php              3.336.1 requires                   guzzlehttp/guzzle (^6.5.8 || ^7.4.5)
codedge/laravel-selfupdater  1.4.3   requires                   guzzlehttp/guzzle (6.*)

And the problem here is that if you update laravel-selfupdater to the version that supports Guzzle 7? laravel/framework 8.

We're on 5.5. (I fully understand (and support!) the no-upgrade policy with regards to the framework.)

This made an endless circle of a headache for me.

  1. Connecting to the modern AWS API requires at least v3 of the SDK library
  2. AWS SDK v3 requires Guzzle 7
  3. Guzzle 7 is not compatible with laravel 5

It won't matter if I switch to PHP 7.4, since I would still have to use the modern AWS library to connect to the API without errors. I have zero control over that API 😞

So my question here is ... is 8 completely out of the question? I don't like needlessly updating the framework, but it's prohibiting connectivity with the AWS API (and the DigitalOcean one as well for anyone who tried that).

Alternatively does anyone have a workaround for this?

ETA:

Here's the error you'll get on PHP 7.4 when you try to flush the cache:

Error occurred saving /storage/app/public/js/vars.js. Error: This installation of the SDK is using PHP version 7.4.3-4ubuntu2.28, which will be deprecated on January 13th, 2025.
Please upgrade your PHP version to a minimum of 8.1.x to continue receiving updates for the AWS SDK for PHP.
To disable this warning, set suppress_php_deprecation_warning to true on the client constructor or set the environment variable AWS_SUPPRESS_PHP_DEPRECATION_WARNING to true.
More information can be found at: https://aws.amazon.com/blogs/developer/announcing-the-end-of-support-for-php-runtimes-8-0-x-and-below-in-the-aws-sdk-for-php/
; File: /var/www/html/vendor/aws/aws-sdk-php/src/ClientResolver.php (1409)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions