1. Go to this page and download the library: Download ytsoni/php-migrater 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/ */
return [
// Required: source and target PHP versions
'source' => '5.6',
'target' => '8.1',
// Paths to analyze (relative to project root)
'paths' => ['src'],
// Directories to exclude
'exclude' => ['vendor', 'tests', 'cache'],
// Report output directory
'report_output' => 'report',
// Generated test output directory
'test_output' => 'tests/migration',
// Number of parallel workers (1 = sequential)
'parallel' => 1,
// Plugin classes to load
'plugins' => [],
// Web GUI port
'web_port' => 8484,
// State file for resume support
'state_file' => '.php-migrater-state.json',
];
use Ylab\PhpMigrater\Plugin\PluginInterface;
class MyPlugin implements PluginInterface
{
public function getName(): string { return 'my-plugin'; }
public function getAnalyzers(): array { return [new MyAnalyzer()]; }
public function getFixers(): array { return []; }
public function getTestGenerators(): array { return []; }
public function getReporters(): array { return []; }
}