Skip to content

Commit

Permalink
Merge branch 'main' of github.com:sweptsquash/ray
Browse files Browse the repository at this point in the history
  • Loading branch information
sweptsquash committed Dec 12, 2024
2 parents 9c8cdd6 + 28e8ced commit 1a000d5
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@

All notable changes to `ray` will be documented in this file

## 1.41.4 - 2024-12-09

### What's Changed

* Provide backwards compatibility with PHPStan 1.x. by @pfrenssen in https://github.com/spatie/ray/pull/952

### New Contributors

* @pfrenssen made their first contribution in https://github.com/spatie/ray/pull/952

**Full Changelog**: https://github.com/spatie/ray/compare/1.41.3...1.41.4

## 1.41.3 - 2024-12-02

### What's Changed
Expand Down
11 changes: 9 additions & 2 deletions src/PHPStan/RemainingRayCallRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,15 @@ public function processNode(Node $node, Scope $scope): array
return [];
}

if ($node->name->getParts()[0] !== 'ray') {
return [];
// Backwards compatibility with PHPStan 1.x.
if (! method_exists($node->name, 'getParts')) {
if ($node->name->parts[0] !== 'ray') {
return [];
}
} else {
if ($node->name->getParts()[0] !== 'ray') {
return [];
}
}

return [
Expand Down

0 comments on commit 1a000d5

Please sign in to comment.