wpsyntex/polylang-phpstan
Composer 安装命令:
composer require wpsyntex/polylang-phpstan
包简介
Polylang extension for PHPStan
README 文档
README
This package provides a PHPStan extension for Polylang and Polylang Pro. It should be used in combination with Polylang Stubs.
Requirements
- PHP 8+
Installation
Require this package as a development dependency with Composer.
Tip
polylang/polylang-stubs is optional but strongly recommended.
composer require --dev wpsyntex/polylang-phpstan composer require --dev wpsyntex/polylang-stubs
Configuration
Adding the extension
Include the extension and stubs in the PHPStan configuration file.
Important
Prior to version 2.1 (included), polylang/polylang-stubs is automatically loaded.
Starting from version 2.2, it must be configured manually.
includes: - vendor/wpsyntex/polylang-phpstan/extension.neon parameters: scanFiles: - vendor/wpsyntex/polylang-stubs/polylang-stubs.php
Opt in to WordPress stubs overrides
The stubs/wordpress-override.php file provides corrected type definitions for specific WordPress functions that have imprecise or incorrect type hints in the standard WordPress stubs (currently sanitize_key(), maybe_serialize(), and sanitize_text_field()).
stubFiles: - vendor/wpsyntex/polylang-phpstan/stubs/wordpress-override.php
wpsyntex/polylang-phpstan 适用场景与选型建议
wpsyntex/polylang-phpstan 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 61.04k 次下载、GitHub Stars 达 4, 最近一次更新时间为 2021 年 02 月 22 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 wpsyntex/polylang-phpstan 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 wpsyntex/polylang-phpstan 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 61.04k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 4
- 点击次数: 14
- 依赖项目数: 4
- 推荐数: 1
其他信息
- 授权协议: GPL-3.0-or-later
- 更新时间: 2021-02-22