承接 wpdesk/phpstan-rules 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

wpdesk/phpstan-rules

最新稳定版本:1.2.1

Composer 安装命令:

composer require wpdesk/phpstan-rules

包简介

Meta package with PHPStan configuration for WP Desk projects

README 文档

README

This meta-package contains PHPStan configuration for WP Desk projects. This includes dependent extensions like szepeviktor/phpstan-wordpress, and additional, default configuration like inclusion of WooCommerce stubs.

Installation

composer require wpdesk/phpstan-rules 

Usage

After installation, you can simply use PHPStan in your project without the need to further configuration. Nevertheless, as project grows, it's worth to add even the basic one.

To run PHPStan, simply execute the following command (<path> is only required if not present in configuration file):

vendor/bin/phpstan analyse <path> 

Dependencies between plugins

Besides WordPress and WooCommerce, it may be sometimes necessary to analyse dependencies between plugins, e.g. when developing an extension to base plugin, PHPStan needs to be aware of the dependent plugin's codebase.

In such cases it is necessary to generate the stubs for the dependent plugin with the use of stub generator library. Try to install it as system-wide utility, rather than plugin's package.

composer global require php-stubs/generator 

With the aid of this library, you will be able to provide read-only access to the dependent codebase for PHPStan purposes. Use stub extension to ignore this file by your editor analyzers.

generate-stubs --out=/path/to/.stubs/dependency.stub -- /path/to/dependency/src 

Remember to regenerate the stubs, whenever there's an important change in upstream plugin.

Finally, include generated stubs in your PHPStan configuration.

parameters: scanFiles: - .stubs/dependency.stub 

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固