Repository navigation
Conversation
Reviewer's GuideImplementationAnnotate the lock-key list and replace the Psalm suppression with PHPStan ignores, retaining the explanation for why unpack() cannot fail.
ConfigurationReplace Psalm with PHPStan in development dependencies, Composer scripts, analysis configuration, and CI, including adding the latest PHP version to the CI matrix.
DocumentationUpdate the internal static-analysis instructions, remove the obsolete type-coverage badge, and record the tool change in the changelog.
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #60 +/- ##
===========================================
Coverage 100.00% 100.00%
Complexity 7 7
===========================================
Files 2 2
Lines 26 26
===========================================
Hits 26 26 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path=".github/workflows/static.yml" line_range="19" />
<code_context>
- psalm:
- uses: yiisoft/actions/.github/workflows/psalm.yml@master
+ phpstan:
+ uses: yiisoft/actions/.github/workflows/phpstan.yml@master
with:
extensions: pdo, pdo_pgsql
</code_context>
<issue_to_address>
**Static analysis check fails**
When the new PHPStan job analyzes `src/PgsqlMutex.php`, pHPStan reports calls on `PDOStatement|false`: `acquireLock()` and `releaseLock()` dereference the results of `PDO::prepare()` without checking them. Since the new configuration scans `src` at maximum level, the static-analysis job fails.
Check that each `PDO::prepare()` result is not false before calling methods on it.
</issue_to_address>Sourcery assessment
Approval pending. 1 finding to address first.
Blocking findings: .github/workflows/static.yml:19
| psalm: | ||
| uses: yiisoft/actions/.github/workflows/psalm.yml@master | ||
| phpstan: | ||
| uses: yiisoft/actions/.github/workflows/phpstan.yml@master |
There was a problem hiding this comment.
🔴 Critical · Static analysis check fails
When the new PHPStan job analyzes src/PgsqlMutex.php, pHPStan reports calls on PDOStatement|false: acquireLock() and releaseLock() dereference the results of PDO::prepare() without checking them. Since the new configuration scans src at maximum level, the static-analysis job fails.
Check that each PDO::prepare() result is not false before calling methods on it.
Prompt for AI agents
In `.github/workflows/static.yml` at line 19:
**Static analysis check fails**
When the new PHPStan job analyzes `src/PgsqlMutex.php`, pHPStan reports calls on `PDOStatement|false`: `acquireLock()` and `releaseLock()` dereference the results of `PDO::prepare()` without checking them. Since the new configuration scans `src` at maximum level, the static-analysis job fails.
Check that each `PDO::prepare()` result is not false before calling methods on it.
Summary by Sourcery
Replace Psalm with PHPStan as the project’s static analysis tool.
Enhancements:
Build:
CI:
Documentation:
Chores: