承接 fsylum/rector-wordpress 相关项目开发

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

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

fsylum/rector-wordpress

最新稳定版本:1.0.0

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)

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-01-21