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

Deprecations messages in symfony 5.4 #2665

Open
Spawnrad opened this issue Mar 27, 2023 · 5 comments
Open

Deprecations messages in symfony 5.4 #2665

Spawnrad opened this issue Mar 27, 2023 · 5 comments
Assignees
Labels
bug This issue is a bug. closed-for-staleness p3 This is a minor priority issue queued This issues is on the AWS team's backlog

Comments

@Spawnrad
Copy link

Describe the bug

Lot of deprecation messages when using this SDK with Symfony 5.4

Expected Behavior

No deprecation message

Current Behavior

User Deprecated: Method "Iterator::key()" might add "mixed" as a native return type declaration in the future. Do the same in implementation "Aws\ResultPaginator" now to avoid errors or add an explicit @return annotation to suppress this message.
User Deprecated: Method "Iterator::next()" might add "void" as a native return type declaration in the future. Do the same in implementation "Aws\ResultPaginator" now to avoid errors or add an explicit @return annotation to suppress this message.
User Deprecated: Method "Iterator::valid()" might add "bool" as a native return type declaration in the future. Do the same in implementation "Aws\ResultPaginator" now to avoid errors or add an explicit @return annotation to suppress this message.
User Deprecated: Method "Iterator::rewind()" might add "void" as a native return type declaration in the future. Do the same in implementation "Aws\ResultPaginator" now to avoid errors or add an explicit @return annotation to suppress this message.

Reproduction Steps

Just run any tests with Symfony 5.4

Possible Solution

No response

Additional Information/Context

No response

SDK version used

3.262.1

Environment details (Version of PHP (php -v)? OS name and version, etc.)

PHP 7.4.33

@Spawnrad Spawnrad added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Mar 27, 2023
@yenfryherrerafeliz yenfryherrerafeliz self-assigned this Mar 30, 2023
@yenfryherrerafeliz yenfryherrerafeliz added investigating This issue is being investigated and/or work is in progress to resolve the issue. p2 This is a standard priority issue and removed needs-triage This issue or PR still needs to be triaged. labels Mar 30, 2023
@zerkms
Copy link

zerkms commented Jul 5, 2023

These warnings come from Aws\ResultPaginator and the trivial fix is to add typing to phpdoc for the methods (like it was done here already: #2434)

@Spawnrad
Copy link
Author

Version 3.316.1
Issue already here

@RanVaknin RanVaknin added queued This issues is on the AWS team's backlog p3 This is a minor priority issue and removed investigating This issue is being investigated and/or work is in progress to resolve the issue. p2 This is a standard priority issue labels Aug 5, 2024
@RanVaknin
Copy link
Contributor

Hi @Spawnrad @zerkms ,

We have added the ReturnTypeWillChange annotation in Aws\ResultPaginator which are meant to suppress these warnings.

@Spawnrad I didnt quite understand your last comment, are you still experiencing this?

Can you enable the SDK's debug logs and share them with us just in case?
Can you re-iterate the reproduction instructions to be more clear so I can reproduce this myself?

Thanks,
Ran~

@RanVaknin RanVaknin added the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label Aug 12, 2024
Copy link

This issue has not recieved a response in 1 week. If you want to keep this issue open, please just leave a comment below and auto-close will be canceled.

@github-actions github-actions bot added closing-soon This issue will automatically close in 4 days unless further comments are made. closed-for-staleness and removed closing-soon This issue will automatically close in 4 days unless further comments are made. labels Aug 23, 2024
@Spawnrad
Copy link
Author

@RanVaknin Yes i have upgrade aws sdk and have the same issue
Here the exact message :

[2024-09-13T15:48:21.781344+02:00] deprecation.INFO: User Deprecated: Method "Iterator::key()" might add "mixed" as a native return type declaration in the future. Do the same in implementation "Aws\ResultPaginator" now to avoid errors or add an explicit @return annotation to suppress this message. {"exception":"[object] (ErrorException(code: 0): User Deprecated: Method "Iterator::key()" might add "mixed" as a native return type declaration in the future. Do the same in implementation "Aws\ResultPaginator" now to avoid errors or add an explicit @return annotation to suppress this message. at /var/www/backend/vendor/symfony/error-handler/DebugClassLoader.php:331)"} []
[2024-09-13T15:48:21.787998+02:00] deprecation.INFO: User Deprecated: Method "Iterator::next()" might add "void" as a native return type declaration in the future. Do the same in implementation "Aws\ResultPaginator" now to avoid errors or add an explicit @return annotation to suppress this message. {"exception":"[object] (ErrorException(code: 0): User Deprecated: Method "Iterator::next()" might add "void" as a native return type declaration in the future. Do the same in implementation "Aws\ResultPaginator" now to avoid errors or add an explicit @return annotation to suppress this message. at /var/www/backend/vendor/symfony/error-handler/DebugClassLoader.php:331)"} []
[2024-09-13T15:48:21.788274+02:00] deprecation.INFO: User Deprecated: Method "Iterator::valid()" might add "bool" as a native return type declaration in the future. Do the same in implementation "Aws\ResultPaginator" now to avoid errors or add an explicit @return annotation to suppress this message. {"exception":"[object] (ErrorException(code: 0): User Deprecated: Method "Iterator::valid()" might add "bool" as a native return type declaration in the future. Do the same in implementation "Aws\ResultPaginator" now to avoid errors or add an explicit @return annotation to suppress this message. at /var/www/backend/vendor/symfony/error-handler/DebugClassLoader.php:331)"} []
[2024-09-13T15:48:21.788538+02:00] deprecation.INFO: User Deprecated: Method "Iterator::rewind()" might add "void" as a native return type declaration in the future. Do the same in implementation "Aws\ResultPaginator" now to avoid errors or add an explicit @return annotation to suppress this message. {"exception":"[object] (ErrorException(code: 0): User Deprecated: Method "Iterator::rewind()" might add "void" as a native return type declaration in the future. Do the same in implementation "Aws\ResultPaginator" now to avoid errors or add an explicit @return annotation to suppress this message. at /var/www/backend/vendor/symfony/error-handler/DebugClassLoader.php:331)"} []

Juste making this call make me have the deprecated message.

    $s3Client = new S3Client([
        'region'  => getenv('AWS_REGION'),
        'version' => 'latest',
        'credentials' => [
            'key'    => getenv('AWS_KEY'),
            'secret' => getenv('AWS_SECRET'),
        ],
    ]);

I use symfony 5.4.

"name": "aws/aws-sdk-php",
"version": "3.321.10",

PHP 7.4.33

Thanks for your help

@RanVaknin RanVaknin reopened this Sep 30, 2024
@github-actions github-actions bot removed the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. closed-for-staleness p3 This is a minor priority issue queued This issues is on the AWS team's backlog
Projects
None yet
Development

No branches or pull requests

4 participants