Download the PHP package xoops/rector-xoops without Composer

On this page you can find all versions of the php package xoops/rector-xoops. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package rector-xoops

rector-xoops — automated XOOPS module modernisation

Custom Rector rules and a ready-to-use rule set that automate the safe, mechanical parts of XOOPS module modernisation (DB-API renames, mysql_*$xoopsDB, legacy superglobals, reference-assignment cleanup, unserialize hardening, the PHP 8.5 string-callable fix, and more).


📖 New here? See docs/TUTORIAL.md for a full walkthrough — every rule explained, how to run it on a module, and how to write your own rules.

Install

Pre-release: the only published version is 1.0.0-alpha1. The @alpha flag lets Composer install it without changing your project's global minimum-stability. Drop the flag once a stable 1.0.0 is tagged: composer require --dev xoops/rector-xoops.

Use it in a module (recommended)

Reference the set from the module's own rector.php. You choose the PHP level (via withPhpSets); this set only adds the XOOPS-specific rules, so it composes cleanly with the skeleton's profile-pinned config:

Then run Rector's binary directly (this package ships no composer rector scripts — add them to the module's own composer.json if you want the shortcut):

Standalone full-sweep (a whole XOOPS tree)

For one-off modernisation across many modules, use the bundled rector-xoops.php, which enables the default XOOPS set only (not XOOPS_RISKY), an example path/skip list, and withPhpSets(php84: true). That php84 sweep is aggressive — lower it to php82 (XoopsCore27) or php74 (XoopsCore25) to match the module's PHP floor:

rector-xoops.php bootstraps this package's Composer autoloader, so it resolves the XOOPS rules even when invoked by a Rector binary installed elsewhere in the tree.

Do I need to create a .rector-cache/ folder? No. Rector creates it automatically the first time it runs (the configs point withCache() at it). It is git-ignored and must not be committed — it's a machine-local, stale-prone cache. Delete it any time to force a clean run.


What it does

xoops/rector-xoops ships 22 custom rules plus several configured built-in Rector rules, organised into two sets. The set is PHP-level-agnostic — your rector.php picks the PHP target (see Install above).

Not in the default set: the ModuleAdmin render*display* renames (opt-in — not behaviour-preserving when the return value is captured), and the future Smarty 4→5 XOOPS_SMARTY5 set (planned, not shipped).

📖 Full rule-by-rule reference — every rule with before→after, the configured built-ins, how to write your own, and what it deliberately does not do — lives in docs/TUTORIAL.md (§3 rules · §4 authoring · §6 non-goals). The tutorial is the single source of truth; this section is just an overview.


Package layout

Adding new rules

  1. Mechanical AST transform, no ambiguity? Add a class under src/Rules/ (one class per file, namespace Xoops\Rector\Rules) and register it in config/sets/xoops.php.
  2. Per-call judgement (e.g. "use getVar('n') for HTML fields)? Leave it as a documented lesson — it can't be automated safely.
  3. Detection-only (e.g. "no new global $xoopsDB")? Make it a PHPStan rule, not Rector.

License

GNU GPL 2.0 or later.


All versions of rector-xoops with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
rector/rector Version ^2.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package xoops/rector-xoops contains the following files

Loading the files please wait ...