skaut/phan-wordpress-stubs 问题修复 & 功能扩展

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

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

skaut/phan-wordpress-stubs

最新稳定版本:1.25.0

Composer 安装命令:

composer require skaut/phan-wordpress-stubs

包简介

High quality stubs for WordPress functions and classes

README 文档

README

GitHub Actions

This repo contains stubs for WordPress functions and classes to be used with phan or phpstan. This allows for better type-checking of a codebase as the stubs all have type information.

Alternatives

php-stubs/wordpress-stubs

The php-stubs/wordpress-stubs project uses stubs that are exported directly from WordPress source code. That means that the stubs are more complete and updated quicker. On the other hand, a lot of functions and classes are documented poorly in WordPress and array types are almost never typed properly (i. e. just array<mixed>). This package has all the stubs created by hand, so they are much more precise.

Installation

$ composer require --dev skaut/wordpress-stubs

Add to your .phan/config.php:

return [
	'directory_list' => [
		'vendor/skaut/wordpress-stubs/stubs'
	],
	'exclude_analysis_directory_list' => [
		'vendor/skaut/wordpress-stubs/stubs'
	]
];

Add to your phpstan.neon:

parameters:
	scanDirectories:
	  - vendor/skaut/wordpress-stubs/stubs
	scanFiles:
	  - vendor/skaut/wordpress-stubs/stubs/WordPress/functions.php
	dynamicConstantNames:
	  - WP_DEBUG
	  - ...

(you have to list dynamic constants yourself)

Completeness

The stubs are not complete. If you spot any missing functions or classes, please open an issue.

统计信息

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

GitHub 信息

  • Stars: 3
  • Watchers: 2
  • Forks: 4
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-11-14

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固