-
-
Notifications
You must be signed in to change notification settings - Fork 10
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 ServiceException to PHPDoc #21
Conversation
WalkthroughThe project's continuous integration workflows have been updated to reflect changes in PHP version support, with PHPUnit configuration no longer specifying PHP 8.1 and 8.2, and Psalm now targeting PHP 8.3. Additionally, the Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on X ? TipsChat with CodeRabbit Bot (
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## 4.x #21 +/- ##
=========================================
Coverage 70.52% 70.52%
Complexity 120 120
=========================================
Files 9 9
Lines 302 302
=========================================
Hits 213 213
Misses 89 89 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files selected for processing (3)
- .github/workflows/phpunit.yml (1 hunks)
- .github/workflows/psalm.yml (1 hunks)
- src/RPC/RPCInterface.php (2 hunks)
Files skipped from review due to trivial changes (1)
- .github/workflows/phpunit.yml
Additional comments: 3
.github/workflows/psalm.yml (1)
- 17-17: The PHP version for Psalm static analysis has been updated to
8.3
. Ensure that this version is compatible with all dependencies and does not introduce any issues with the existing codebase.Verification successful
The update to PHP 8.3 in the Psalm GitHub Action workflow is compatible with Psalm's requirement for PHP version
>=8.1
, as indicated in itscomposer.json
. However, the attempt to run Psalm to check for new issues was not successful due to the environment setup. It is recommended to run Psalm in the actual codebase environment to ensure no new issues are introduced with PHP 8.3.Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Verify that Psalm supports PHP 8.3 and no issues are introduced by this change. # Check Psalm's composer.json for PHP version support. rg '"php":' $(fd composer.json --exec grep -l "psalm/psalm") # Run Psalm to ensure no new issues are introduced with PHP 8.3. ./vendor/bin/psalmLength of output: 213
src/RPC/RPCInterface.php (2)
9-9: The
use
statement forServiceException
has been added correctly. This change will help developers understand the exceptions that thecall
method can throw.35-35: The PHPDoc for the
call
method has been updated to include@throws ServiceException
. This update is important for developers to be aware of the exceptions that can be thrown by this method. Ensure that this update is reflected in the documentation and that theServiceException
is indeed thrown by thecall
method.Verification successful
The search for occurrences of
ServiceException
being thrown in the codebase has yielded a result insrc/RPC/RPC.php
. This confirms that theServiceException
is indeed thrown within the codebase, specifically in theRPC
class. This supports the update made in the PHPDoc for thecall
method inRPCInterface.php
, which now includes@throws ServiceException
to inform developers of this potential exception.Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Verify that the `call` method can throw `ServiceException`. ast-grep --lang php --pattern $'class $_ { $$$ function call($_, $_, $_) { $$$ throw new ServiceException($_); $$$ } $$$ }'Length of output: 251
Script:
#!/bin/bash # Search for the pattern where `ServiceException` is thrown within the `call` method in PHP files. rg --type php 'function call\(' -A 10 | rg 'throw new ServiceException'Length of output: 73
Script:
#!/bin/bash # Search for any occurrence of `ServiceException` being thrown in the entire codebase. rg --type php 'throw new ServiceException'Length of output: 144
What was changed
Spiral\Goridge\RPC\Exception\ServiceException
has been added to the PHPDoc. It is thrown in this method:https://github.com/roadrunner-php/goridge/blob/4.x/src/RPC/RPC.php#L101