PHP code example of dpt / mcp-rector-warm

1. Go to this page and download the library: Download dpt/mcp-rector-warm 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/ */

    

dpt / mcp-rector-warm example snippets

json
{
  "presets": ["mcp"],
  "mcp": {
    "rector-warm": {
      "cmd": ["vendor/bin/mcp-rector-warm", "--config=rector.php"],
      "match": "*.php",
      "timeout": 120,
      "idle_timeout": 1800
    }
  },
  "validators": {
    "rector": {
      "cmd": "MCP_RECTOR_CONFIG=rector.php MCP_RECTOR_BIN=vendor/bin/mcp-rector-warm {python} {supertool_dir}/validators/rector-mcp/rector-mcp.py {file}",
      "match": "*.php",
      "hooks_into": ["edit", "replace", "replace_lines", "paste", "vim"],
      "mcp_autospawn": true,
      "timeout": 120
    }
  }
}