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

Add union type to suppress deprecation warning #324

Merged
merged 2 commits into from
Nov 9, 2023

Conversation

mxr576
Copy link
Contributor

@mxr576 mxr576 commented Oct 19, 2023

Closes #323

Copy link

codecov bot commented Nov 8, 2023

Codecov Report

Merging #324 (e7f67df) into 3.x (bf77952) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##                3.x     #324      +/-   ##
============================================
- Coverage     87.60%   87.60%   -0.01%     
  Complexity     1749     1749              
============================================
  Files           349      349              
  Lines          4705     4704       -1     
============================================
- Hits           4122     4121       -1     
  Misses          583      583              
Flag Coverage Δ
unittests 87.60% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
...tpClient/Plugin/RetryOauthAuthenticationPlugin.php 100.00% <100.00%> (ø)

@mxr576
Copy link
Contributor Author

mxr576 commented Nov 8, 2023

🤔 ...

$ vendor/vimeo/psalm/psalm --config=psalm.xml.dist --show-info=false --stats
Warning: "findUnusedBaselineEntry" will default to "true" in Psalm 6. You should explicitly enable or disable this setting.
Warning: "findUnusedCode" will default to "true" in Psalm 6. You should explicitly enable or disable this setting.
Warning: "findUnusedBaselineEntry" will default to "true" in Psalm 6. You should explicitly enable or disable this setting.
Warning: "findUnusedCode" will default to "true" in Psalm 6. You should explicitly enable or disable this setting.
Target PHP version: 8.1 (inferred from composer.json) (unsupported extensions: reflection).
Scanning files...
Analyzing files...



------------------------------
                              
       No errors found!       
                              
------------------------------
937 other issues found.
You can display them with --show-info=true
------------------------------

Checks took 0.13 seconds and used 15.467MB of memory
No files analyzed
Psalm was able to infer types for 93.0589% of the codebase
-----------------

InvalidArgument: Argument 2 of Http\Promise\Promise::then expects callable(Exception):mixed|null, but impure-Closure(Http\Client\Exception):mixed provided
@mxr576
Copy link
Contributor Author

mxr576 commented Nov 8, 2023

I do not know why I could not reproduce the issue locally but I managed to fix it... 💯 :D

Copy link
Collaborator

@divya-intelli divya-intelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@divya-intelli
Copy link
Collaborator

vendor/vimeo/psalm/psalm --config=psalm.xml.dist --show-info=false --stats

Thank you @mxr576 for the fix, I was locally able to replicate the psalm error and the fix looks good.

@divya-intelli divya-intelli merged commit a34f592 into apigee:3.x Nov 9, 2023
6 checks passed
@shishir-intelli shishir-intelli added this to the 3.0.3 milestone Dec 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

Fetching class constant class of deprecated class Http\Message\UriFactory since version 1.1...
3 participants