Skip to content

Conversation

@ManukMinasyan
Copy link
Contributor

phpstan 2.1.34 breaks rector 2.3.1 causing parallel processing crashes and "Service name must be a non-empty string" errors on php 8.4. also simplify GitHubService by returning directly from Cache::remember.

phpstan 2.1.34 breaks rector 2.3.1 causing parallel processing crashes
and "Service name must be a non-empty string" errors on php 8.4.
also simplify GitHubService by returning directly from Cache::remember.
Copilot AI review requested due to automatic review settings January 19, 2026 23:04
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request addresses a compatibility issue between phpstan 2.1.34 and rector 2.3.1 that causes parallel processing crashes on PHP 8.4, and simplifies the GitHubService implementation by removing redundant code.

Changes:

  • Pin phpstan to version 2.1.33 to avoid rector compatibility issues
  • Simplify GitHubService.getStarsCount() by directly returning from Cache::remember()

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.

File Description
composer.json Added exact version constraint for phpstan at 2.1.33 to prevent automatic updates that break rector compatibility
composer.lock Updated lock file to reflect phpstan downgrade from 2.1.34 to 2.1.33
app/Services/GitHubService.php Removed redundant variable assignment and null check since Cache::remember() closure always returns int

"pestphp/pest-plugin-laravel": "^4.0",
"pestphp/pest-plugin-livewire": "^4.0",
"pestphp/pest-plugin-type-coverage": "^4.0",
"phpstan/phpstan": "2.1.33",
Copy link

Copilot AI Jan 19, 2026

Choose a reason for hiding this comment

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

The exact version pin for phpstan (without ^ or ~) will prevent automatic patch updates. While this is appropriate as a temporary workaround for the rector compatibility issue, consider documenting this constraint (e.g., adding a comment explaining why it's pinned) or tracking when it can be unpinned once rector is updated to support newer phpstan versions.

Suggested change
"phpstan/phpstan": "2.1.33",
"phpstan/phpstan": "^2.1.33",

Copilot uses AI. Check for mistakes.
@ManukMinasyan ManukMinasyan merged commit 5797634 into main Jan 19, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants