mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-17 21:38:22 +01:00
Updated Rector to commit 1d2d51e20ce11d0f603e42bd8869c1ab6d2a52cc
1d2d51e20c
[Nette] Replace deprecated Json::FORCE_ARRAY and Json::PRETTY on Nette\Utils\Json usage (#5814)
This commit is contained in:
parent
d495dc4fe7
commit
9427cdb84c
@ -8,8 +8,8 @@ use RectorPrefix202404\Nette\Utils\FileSystem;
|
||||
use RectorPrefix202404\Nette\Utils\Json;
|
||||
require __DIR__ . '/../vendor/autoload.php';
|
||||
$composerJsonFileContents = FileSystem::read(__DIR__ . '/../composer.json');
|
||||
$composerJson = Json::decode($composerJsonFileContents, Json::FORCE_ARRAY);
|
||||
$composerJson = Json::decode($composerJsonFileContents, \true);
|
||||
$composerJson['replace']['phpstan/phpstan'] = $composerJson['require']['phpstan/phpstan'];
|
||||
$modifiedComposerJsonFileContents = Json::encode($composerJson, Json::PRETTY);
|
||||
$modifiedComposerJsonFileContents = Json::encode($composerJson, \true);
|
||||
FileSystem::write(__DIR__ . '/../composer.json', $modifiedComposerJsonFileContents, null);
|
||||
echo 'Done!' . \PHP_EOL;
|
||||
|
@ -19,12 +19,12 @@ final class VersionResolver
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const PACKAGE_VERSION = 'a67952f6d15ef954da70898c58aa10567b51c11e';
|
||||
public const PACKAGE_VERSION = '1d2d51e20ce11d0f603e42bd8869c1ab6d2a52cc';
|
||||
/**
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const RELEASE_DATE = '2024-04-08 20:32:48';
|
||||
public const RELEASE_DATE = '2024-04-10 03:35:14';
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
|
@ -47,7 +47,7 @@ final class JsonOutputFormatter implements OutputFormatterInterface
|
||||
if ($errorsData !== []) {
|
||||
$errorsJson['errors'] = $errorsData;
|
||||
}
|
||||
$json = Json::encode($errorsJson, Json::PRETTY);
|
||||
$json = Json::encode($errorsJson, \true);
|
||||
echo $json . \PHP_EOL;
|
||||
}
|
||||
/**
|
||||
|
@ -55,7 +55,7 @@ final class ListRulesCommand extends Command
|
||||
$outputFormat = $input->getOption(Option::OUTPUT_FORMAT);
|
||||
if ($outputFormat === 'json') {
|
||||
$data = ['rectors' => $rectorClasses, 'skipped-rectors' => $skippedClasses];
|
||||
echo Json::encode($data, Json::PRETTY) . \PHP_EOL;
|
||||
echo Json::encode($data, \true) . \PHP_EOL;
|
||||
return Command::SUCCESS;
|
||||
}
|
||||
$this->symfonyStyle->title('Loaded Rector rules');
|
||||
|
@ -13,14 +13,14 @@ final class JsonFileSystem
|
||||
public static function readFilePath(string $filePath) : array
|
||||
{
|
||||
$fileContents = FileSystem::read($filePath);
|
||||
return Json::decode($fileContents, Json::FORCE_ARRAY);
|
||||
return Json::decode($fileContents, \true);
|
||||
}
|
||||
/**
|
||||
* @param array<string, mixed> $data
|
||||
*/
|
||||
public static function writeFile(string $filePath, array $data) : void
|
||||
{
|
||||
$json = Json::encode($data, Json::PRETTY);
|
||||
$json = Json::encode($data, \true);
|
||||
FileSystem::write($filePath, $json, null);
|
||||
}
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ final class ProjectComposerJsonPhpVersionResolver
|
||||
return self::$cachedPhpVersions[$composerJson];
|
||||
}
|
||||
$composerJsonContents = FileSystem::read($composerJson);
|
||||
$projectComposerJson = Json::decode($composerJsonContents, Json::FORCE_ARRAY);
|
||||
$projectComposerJson = Json::decode($composerJsonContents, \true);
|
||||
// give this one a priority, as more generic one
|
||||
$requirePhpVersion = $projectComposerJson['require']['php'] ?? null;
|
||||
if ($requirePhpVersion !== null) {
|
||||
|
@ -33,7 +33,7 @@ final class PolyfillPackagesProvider
|
||||
return $this->cachedPolyfillPackages;
|
||||
}
|
||||
$composerContents = FileSystem::read($projectComposerJson);
|
||||
$composerJson = Json::decode($composerContents, Json::FORCE_ARRAY);
|
||||
$composerJson = Json::decode($composerContents, \true);
|
||||
$this->cachedPolyfillPackages = $this->filterPolyfillPackages($composerJson['require'] ?? []);
|
||||
return $this->cachedPolyfillPackages;
|
||||
}
|
||||
|
16
vendor/composer/installed.json
vendored
16
vendor/composer/installed.json
vendored
@ -504,8 +504,8 @@
|
||||
},
|
||||
{
|
||||
"name": "illuminate\/container",
|
||||
"version": "v10.48.4",
|
||||
"version_normalized": "10.48.4.0",
|
||||
"version": "v10.48.5",
|
||||
"version_normalized": "10.48.5.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https:\/\/github.com\/illuminate\/container.git",
|
||||
@ -561,8 +561,8 @@
|
||||
},
|
||||
{
|
||||
"name": "illuminate\/contracts",
|
||||
"version": "v10.48.4",
|
||||
"version_normalized": "10.48.4.0",
|
||||
"version": "v10.48.5",
|
||||
"version_normalized": "10.48.5.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https:\/\/github.com\/illuminate\/contracts.git",
|
||||
@ -1802,12 +1802,12 @@
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https:\/\/github.com\/rectorphp\/rector-phpunit.git",
|
||||
"reference": "a56b646588d42fce925cb270753980441bdd2e17"
|
||||
"reference": "a620d41d54f70f29086a545dd5ab94a51496b4e2"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-phpunit\/zipball\/a56b646588d42fce925cb270753980441bdd2e17",
|
||||
"reference": "a56b646588d42fce925cb270753980441bdd2e17",
|
||||
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-phpunit\/zipball\/a620d41d54f70f29086a545dd5ab94a51496b4e2",
|
||||
"reference": "a620d41d54f70f29086a545dd5ab94a51496b4e2",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -1830,7 +1830,7 @@
|
||||
"tomasvotruba\/class-leak": "^0.2",
|
||||
"tracy\/tracy": "^2.10"
|
||||
},
|
||||
"time": "2024-04-03T15:16:56+00:00",
|
||||
"time": "2024-04-09T11:54:26+00:00",
|
||||
"default-branch": true,
|
||||
"type": "rector-extension",
|
||||
"extra": {
|
||||
|
2
vendor/composer/installed.php
vendored
2
vendor/composer/installed.php
vendored
File diff suppressed because one or more lines are too long
@ -9,7 +9,7 @@ namespace Rector\RectorInstaller;
|
||||
*/
|
||||
final class GeneratedConfig
|
||||
{
|
||||
public const EXTENSIONS = array('rector/rector-doctrine' => array('install_path' => '/home/runner/work/rector-src/rector-src/rector-build/vendor/rector/rector-doctrine', 'relative_install_path' => '../../rector-doctrine', 'extra' => NULL, 'version' => 'dev-main b3da143'), 'rector/rector-downgrade-php' => array('install_path' => '/home/runner/work/rector-src/rector-src/rector-build/vendor/rector/rector-downgrade-php', 'relative_install_path' => '../../rector-downgrade-php', 'extra' => NULL, 'version' => 'dev-main 05e44cf'), 'rector/rector-phpunit' => array('install_path' => '/home/runner/work/rector-src/rector-src/rector-build/vendor/rector/rector-phpunit', 'relative_install_path' => '../../rector-phpunit', 'extra' => NULL, 'version' => 'dev-main a56b646'), 'rector/rector-symfony' => array('install_path' => '/home/runner/work/rector-src/rector-src/rector-build/vendor/rector/rector-symfony', 'relative_install_path' => '../../rector-symfony', 'extra' => NULL, 'version' => 'dev-main b07f946'));
|
||||
public const EXTENSIONS = array('rector/rector-doctrine' => array('install_path' => '/home/runner/work/rector-src/rector-src/rector-build/vendor/rector/rector-doctrine', 'relative_install_path' => '../../rector-doctrine', 'extra' => NULL, 'version' => 'dev-main b3da143'), 'rector/rector-downgrade-php' => array('install_path' => '/home/runner/work/rector-src/rector-src/rector-build/vendor/rector/rector-downgrade-php', 'relative_install_path' => '../../rector-downgrade-php', 'extra' => NULL, 'version' => 'dev-main 05e44cf'), 'rector/rector-phpunit' => array('install_path' => '/home/runner/work/rector-src/rector-src/rector-build/vendor/rector/rector-phpunit', 'relative_install_path' => '../../rector-phpunit', 'extra' => NULL, 'version' => 'dev-main a620d41'), 'rector/rector-symfony' => array('install_path' => '/home/runner/work/rector-src/rector-src/rector-build/vendor/rector/rector-symfony', 'relative_install_path' => '../../rector-symfony', 'extra' => NULL, 'version' => 'dev-main b07f946'));
|
||||
private function __construct()
|
||||
{
|
||||
}
|
||||
|
8
vendor/rector/rector-phpunit/composer.json
vendored
8
vendor/rector/rector-phpunit/composer.json
vendored
@ -40,6 +40,14 @@
|
||||
]
|
||||
},
|
||||
"scripts": {
|
||||
"complete-check": [
|
||||
"@check-cs",
|
||||
"@class-leak",
|
||||
"@phpstan",
|
||||
"@rector",
|
||||
"@docs",
|
||||
"phpunit"
|
||||
],
|
||||
"phpstan": "vendor\/bin\/phpstan analyse --ansi --error-format symplify",
|
||||
"check-cs": "vendor\/bin\/ecs check --ansi",
|
||||
"class-leak": "vendor\/bin\/class-leak check config src rules",
|
||||
|
Loading…
x
Reference in New Issue
Block a user