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

Expecting RequestInterface, given RulesetEndpoint #276

Open
bkmorse opened this issue Dec 12, 2023 · 6 comments
Open

Expecting RequestInterface, given RulesetEndpoint #276

bkmorse opened this issue Dec 12, 2023 · 6 comments
Labels
PHP 8.2 PHP 8.3 Compatibility with PHP 8.3

Comments

@bkmorse
Copy link

bkmorse commented Dec 12, 2023

Recently upgraded from php 8.2 to 8.3 and ran composer update and now I see the error below. I switched back to php 8.2 and it works and switched back to 8.3 and the error shows up again. Any help is appreciated. Thank you.

Schema

Describe your table schema:

  • Primary key: name
  • Any index?: no

image

Debug info

$model->where('group', 'reports')
->where('name', 'reports.version')
->first();

Config

[
    'credentials' => [
        'key' => 'dynamodb_local',
        'secret' => 'secret',
    ],
    'region' => 'stub',
    'endpoint' => 'localhost',
    'debug' => true,
]

Error

Aws\TraceMiddleware::Aws{closure}(): Argument #2 ($request) must be of type ?Psr\Http\Message\RequestInterface, Aws\EndpointV2\Ruleset\RulesetEndpoint given, called in vendor/aws/aws-sdk-php/src/EndpointV2/EndpointV2Middleware.php on line 100.

Version info

  • Laravel: 8.8
  • laravel-dynamodb: latest
  • php 8.3
@nelson6e65
Copy link
Collaborator

nelson6e65 commented Dec 12, 2023

I have not tried on PHP 8.3. 🤔

Are aws/aws-sdk-php versions different between your installs on PHP 8.2 and PHP 8.3?

@nelson6e65
Copy link
Collaborator

Have you tried running composer install instead of composer update instead?

@nelson6e65 nelson6e65 added the PHP 8.3 Compatibility with PHP 8.3 label Dec 12, 2023
@bkmorse
Copy link
Author

bkmorse commented Dec 12, 2023

I have tried both composer install and update

version of aws/aws-sdk-php:
php 8.2: 3.271.8
php 8.3: 3.271.8 (after composer install)
php 8.3: 3.293.8 (after composer update)

@bkmorse
Copy link
Author

bkmorse commented Dec 13, 2023

I downgraded to 8.2, using docker image: php:8.2.9RC1-fpm-alpine3.17

It still had aws/aws-sdk-php set to version 3.293.9, so I ran:

composer require aws/aws-sdk-php:3.271.8

Then it worked

@bkmorse
Copy link
Author

bkmorse commented Dec 17, 2023

Seems like aws/aws-sdk-php does not support php 8.3

@nelson6e65
Copy link
Collaborator

@bkmorse Chan you check if using aws/aws-sdk-php >= 3.298.0 solves this problem?

https://github.com/aws/aws-sdk-php/blob/master/CHANGELOG.md#32980---2024-01-31

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

No branches or pull requests

2 participants