fsylum/rector-wordpress
Composer 安装命令:
composer require fsylum/rector-wordpress
包简介
Rector upgrades rules for WordPress
README 文档
README
This package is a Rector extension developed to provide upgrade rules for WordPress.
Requirements
- PHP 8.2 or higher
- Rector 2.0 or higher
Install
Install the rector-wordpress package as dependency:
composer require fsylum/rector-wordpress --dev
Use Sets
To add a set to your config, use Fsylum\RectorWordPress\Set\WordPressSetList class and pick one of the constants. For example, to update the codebase to WordPress 6.8, use WordPressSetList::WP_6_8.
use Fsylum\RectorWordPress\Set\WordPressSetList; use Rector\Config\RectorConfig; return static function (RectorConfig $rectorConfig): void { $rectorConfig->sets([ WordPressSetList::WP_6_8, ]); };
You can also use a level set list to include all the applicable rules from the lowest version, 0.71 up to the one you specified. For example, WordPressLevelSetList::UP_TO_WP_6_8 will include all the rules from WordPress 0.71 up to 6.8. In most cases, this is the preferable way to transform your code as you only need to specify it once.
use Fsylum\RectorWordPress\Set\WordPressLevelSetList; use Rector\Config\RectorConfig; return static function (RectorConfig $rectorConfig): void { $rectorConfig->sets([ WordPressLevelSetList::UP_TO_WP_6_8, ]); };
Supported WordPress Versions
This package provides upgrade rules for WordPress versions from 0.71 to 6.8, covering:
- WordPress 0.71, 1.0, 1.2, 1.5
- WordPress 2.x (2.0 through 2.9)
- WordPress 3.x (3.0 through 3.9)
- WordPress 4.x (4.0 through 4.9)
- WordPress 5.x (5.0 through 5.9)
- WordPress 6.x (6.0 through 6.8)
fsylum/rector-wordpress 适用场景与选型建议
fsylum/rector-wordpress 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 18.11k 次下载、GitHub Stars 达 22, 最近一次更新时间为 2024 年 01 月 21 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 fsylum/rector-wordpress 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 fsylum/rector-wordpress 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 18.11k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 22
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-01-21