定制 wwwision/types-phpstan 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

wwwision/types-phpstan

Composer 安装命令:

composer require wwwision/types-phpstan

包简介

Custom PHPStan rules for wwwision/types

README 文档

README

Custom PHPStan rules and extensions for the wwwision/types package

What's included

  • Rules that enforce the best practices for #[TypeBased] classes (must be final, readonly, have a private constructor and never be constructed directly).
  • A reflection extension for dynamic schemas: instances of DynamicRecord are read via __get, so PHPStan would normally report $record->someProperty as access to an undefined property. The extension teaches PHPStan that any property of a DynamicRecord is a readable (immutable) mixed value, so object-accessor syntax type-checks. (A dynamic record's shape is only known at runtime, so per-property types cannot be inferred.)

Installation

To use this extension, require it in Composer:

composer require --dev wwwision/types-phpstan

If you also install phpstan/extension-installer then you're all set!

Manual installation

If you don't want to use phpstan/extension-installer, include rules.neon in your project's PHPStan config:

includes:
    - vendor/wwwision/types-phpstan/rules.neon

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-11-20

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固