Skip to content

feat: use phpstan extension installer#73

Open
ictbeheer wants to merge 1 commit intomainfrom
feat/phpstan-update
Open

feat: use phpstan extension installer#73
ictbeheer wants to merge 1 commit intomainfrom
feat/phpstan-update

Conversation

@ictbeheer
Copy link
Member

@ictbeheer ictbeheer commented Mar 2, 2026

This pull request updates the project's static analysis tooling by adding the phpstan/extension-installer package and making related configuration changes. The main goal is to simplify and automate the registration of PHPStan extensions.

Dependency and configuration updates:

  • Added phpstan/extension-installer to the require-dev section in composer.json to automatically register PHPStan extensions.
  • Updated the allow-plugins section in composer.json to permit phpstan/extension-installer to run as a Composer plugin.

PHPStan configuration simplification:

  • Removed manual includes for the Larastan and WordPress PHPStan extensions from phpstan.neon.dist, as these are now handled automatically by the extension installer.

Copilot AI review requested due to automatic review settings March 2, 2026 13:45
@ictbeheer ictbeheer requested a review from a team as a code owner March 2, 2026 13:45
@github-actions
Copy link

github-actions bot commented Mar 2, 2026

Composer package changes
Dev Packages Operation Base Target Link License
phpstan/extension-installer New - 1.4.3 Compare MIT

@github-actions
Copy link

github-actions bot commented Mar 2, 2026

Coverage report for commit: dbc1cfe
File: coverage.xml

Cover ┌─────────────────────────┐ Freq.
   0% │ ░░░░░░░░░░░░░░░░░░░░░░░ │  0.0%
  10% │ ░░░░░░░░░░░░░░░░░░░░░░░ │  0.0%
  20% │ ░░░░░░░░░░░░░░░░░░░░░░░ │  0.0%
  30% │ ░░░░░░░░░░░░░░░░░░░░░░░ │  0.0%
  40% │ ░░░░░░░░░░░░░░░░░░░░░░░ │  0.0%
  50% │ ░░░░░░░░░░░░░░░░░░░░░░░ │  0.0%
  60% │ ░░░░░░░░░░░░░░░░░░░░░░░ │  0.0%
  70% │ ░░░░░░░░░░░░░░░░░░░░░░░ │  0.0%
  80% │ ░░░░░░░░░░░░░░░░░░░░░░░ │  0.0%
  90% │ ░░░░░░░░░░░░░░░░░░░░░░░ │  0.0%
 100% │ ███████████████████████ │ 100.0%
      └─────────────────────────┘
 *Legend:* █ = Current Distribution 
Summary - Lines: 100.00% | Methods: 100.00%
FilesLinesMethodsBranches
src/Console
   ExampleCommand.php100.00%100.00%100.00%
src
   Example.php100.00%100.00%100.00%
   SkeletonPackageServiceProvider.php100.00%100.00%100.00%

🤖 comment via lucassabreu/comment-coverage-clover

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 PR updates the project’s PHPStan setup to rely on phpstan/extension-installer rather than manually including individual PHPStan extension NEON files.

Changes:

  • Removed manual includes entries from phpstan.neon.dist.
  • Added phpstan/extension-installer to require-dev and allowed it under Composer allow-plugins.
  • Updated composer.lock to include the new plugin and reflect updated lock metadata.

Reviewed changes

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

File Description
phpstan.neon.dist Removes explicit Larastan/WordPress extension includes in favor of extension installer-based discovery.
composer.json Allows the Composer plugin and adds phpstan/extension-installer as a dev dependency.
composer.lock Locks the new plugin and updates lock metadata/platform overrides accordingly.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 1 to 2
parameters:
level: 8
Copy link

Copilot AI Mar 2, 2026

Choose a reason for hiding this comment

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

With the explicit Larastan and WordPress extension includes removed, PHPStan will no longer load those extensions unless the extension-installer generated config is included. Add an includes section that points to the extension-installer config (typically the file it generates under vendor/phpstan/extension-installer/) so phpstan-extension packages are still registered.

Copilot uses AI. Check for mistakes.
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.

4 participants