eboreum/immutable-interface-phpstan-checker 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

eboreum/immutable-interface-phpstan-checker

Composer 安装命令:

composer require --dev eboreum/immutable-interface-phpstan-checker

包简介

Check your project's code for adherence to immutability (class implementing Eboreum\ImmutableInterface\ImmutableInterface) using PHPStan (https://phpstan.org/).

README 文档

README

license pipeline status coverage report PHPStan Level

immutable-interface-phpstan-checker-logo

A PHPStan rule, which checks all classes implementing (or interfaces extending) Eboreum\ImmutableInterface\ImmutableInterface (available in the eboreum/immutable-interface package) for adherence to immutability.

This library respects the paths defined in your custom code base's phpstan.neon file.

An alternative

If you do not like the inheritance pattern or if you have specific cases where you do not want inheritance to apply, you may instead use these libraries in combination:

  1. php-static-analysis/attributes: Defines the @immutable annotation.
  2. php-static-analysis/phpstan-extension: A --dev package, which reacts to the annotations defined in php-static-analysis/attributes (bullet 1).

Requirements

"php": "^8.5",
"eboreum/immutable-interface": "^1.0",
"phpstan/phpstan": "^2.0"

Installation

Via Composer (https://packagist.org/packages/eboreum/immutable-interface-phpstan-checker):

composer require --dev eboreum/immutable-interface-phpstan-checker

Update your local phpstan.neon to load this package as a PHPStan extension:

includes:
    - vendor/eboreum/immutable-interface-phpstan-checker/phpstan.neon

Via GitLab:

git clone git@gitlab.com:eboreum/immutable-interface-phpstan-checker.git

License & Disclaimer

See LICENSE file. Basically: Use this library at your own risk.

Acknowledgements

ChatGPT and GitHub Copilot were used to implement parts of this code base. However, this project is not entirely vibe coded. Everything has been inspected and sometimes rewritten by human eyes and brains.

Contributing

We prefer that you create an issue and or a merge request at https://gitlab.com/eboreum/immutable-interface-phpstan-checker, and have a discussion about a feature or bug here.

Credits

Authors

AI Disclaimer

Parts of this code base has been made using AI, namely GPT-5.5! Although, there was an adult in the room during this process.

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-06-24

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固