mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-18 05:48:21 +01:00
21 lines
492 B
PHP
Executable File
21 lines
492 B
PHP
Executable File
#!/usr/bin/env php
|
|
<?php declare(strict_types=1);
|
|
|
|
use Nette\Utils\Strings;
|
|
|
|
require_once __DIR__ . '/bootstrap.php';
|
|
|
|
$binPath = __DIR__ . '/../build/bin/rector';
|
|
|
|
$binContent = file_get_contents($binPath);
|
|
|
|
// add constant to make clear the define('RECTOR_PREFIXED', true)
|
|
$binContent = Strings::replace(
|
|
$binContent,
|
|
'#namespace RectorPrefixed;#',
|
|
'namespace RectorPrefixed;' . PHP_EOL . "define('RECTOR_PREFIXED', true);"
|
|
);
|
|
|
|
// save
|
|
file_put_contents($binPath, $binContent);
|