rector/bin/add-phpstan-self-replace.php
Tomas Votruba f010267a7c Updated Rector to commit 6b69971dfc740a58aed918782d02710e42004e9d
6b69971dfc [NodeTypeCorrector] Directly use StringType on Intersection of strings on AccessoryNonEmptyStringTypeCorrector (#5933)
2024-06-01 09:25:16 +00:00

16 lines
652 B
PHP

<?php
// this is part of downgrade build
declare (strict_types=1);
namespace RectorPrefix202406;
use RectorPrefix202406\Nette\Utils\FileSystem;
use RectorPrefix202406\Nette\Utils\Json;
require __DIR__ . '/../vendor/autoload.php';
$composerJsonFileContents = FileSystem::read(__DIR__ . '/../composer.json');
$composerJson = Json::decode($composerJsonFileContents, \true);
$composerJson['replace']['phpstan/phpstan'] = $composerJson['require']['phpstan/phpstan'];
$modifiedComposerJsonFileContents = Json::encode($composerJson, \true);
FileSystem::write(__DIR__ . '/../composer.json', $modifiedComposerJsonFileContents, null);
echo 'Done!' . \PHP_EOL;