PHP code example of xoops / rector-xoops

1. Go to this page and download the library: Download xoops/rector-xoops library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

xoops / rector-xoops example snippets


use Rector\Config\RectorConfig;
use Rector\ValueObject\PhpVersion;
use Xoops\Rector\Set\XoopsSetList;

return RectorConfig::configure()
    ->withPaths([__DIR__ . '/class', __DIR__ . '/admin', __DIR__ . '/

->withSets([XoopsSetList::XOOPS, XoopsSetList::XOOPS_RISKY]) // risky is opt-in

composer.json                 package + PSR-4 autoload ("Xoops\Rector\\" => src/)
src/Set/XoopsSetList.php       XoopsSetList::XOOPS → config/sets/xoops.php
src/Rules/*.php                the 22 custom rule classes (one per file, Xoops\Rector\Rules\*)
src/Support/*.php              shared detector traits (SqlKeywordDetector, MytsReceiverDetector)
config/sets/xoops.php          the reusable rule set (no paths/PHP-sets)
rector-xoops.php              standalone full-sweep config (php84 + example paths)
rector.php / phpstan.neon.dist / .php-cs-fixer.dist.php   the package's own QA
.github/workflows/ci.yml      library CI (validate, CS, PHPStan, autoload smoke test)