Skip to content

Commit

Permalink
Updated Rector to commit c390eabeb2b2f77f755bfadc1d51b000da0d5ade
Browse files Browse the repository at this point in the history
rectorphp/rector-src@c390eab Skip mixed in ParamTypeByMethodCallTypeRector as not specific (#5715)
  • Loading branch information
TomasVotruba committed Mar 12, 2024
1 parent 4be56b3 commit 03f122a
Show file tree
Hide file tree
Showing 15 changed files with 188 additions and 116 deletions.
13 changes: 13 additions & 0 deletions rules/TypeDeclaration/NodeAnalyzer/CallerParamMatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
use PhpParser\Node\UnionType;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\ClassReflection;
use PHPStan\Type\MixedType;
use PHPStan\Type\NullType;
use Rector\NodeNameResolver\NodeNameResolver;
use Rector\NodeTypeResolver\TypeComparator\TypeComparator;
Expand Down Expand Up @@ -65,6 +66,10 @@ public function matchCallParamType($call, Param $param, Scope $scope)
return null;
}
if (!$param->default instanceof Expr && !$callParam->default instanceof Expr) {
// skip as mixed is not helpful and possibly requires more precise change elsewhere
if ($this->isCallParamMixed($callParam)) {
return null;
}
return $callParam->type;
}
if (!$callParam->type instanceof Node) {
Expand Down Expand Up @@ -159,4 +164,12 @@ private function resolveParentMethodParam(Scope $scope, string $methodName, int
}
return null;
}
private function isCallParamMixed(Param $param) : bool
{
if (!$param->type instanceof Node) {
return \false;
}
$callParamType = $this->staticTypeMapper->mapPhpParserNodePHPStanType($param->type);
return $callParamType instanceof MixedType;
}
}
2 changes: 1 addition & 1 deletion src/Application/FileProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
declare (strict_types=1);
namespace Rector\Application;

use RectorPrefix202403\Nette\Utils\Strings;
use PHPStan\AnalysedCodeException;
use Rector\Caching\Detector\ChangedFilesDetector;
use Rector\ChangesReporting\ValueObjectFactory\ErrorFactory;
Expand All @@ -23,7 +24,6 @@
use Rector\ValueObject\Reporting\FileDiff;
use RectorPrefix202403\Symfony\Component\Console\Style\SymfonyStyle;
use Throwable;
use RectorPrefix202403\Nette\Utils\Strings;
final class FileProcessor
{
/**
Expand Down
4 changes: 2 additions & 2 deletions src/Application/VersionResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ final class VersionResolver
* @api
* @var string
*/
public const PACKAGE_VERSION = 'a775c65eeccc0c6ed106adbe836ab114f37c5da4';
public const PACKAGE_VERSION = 'c390eabeb2b2f77f755bfadc1d51b000da0d5ade';
/**
* @api
* @var string
*/
public const RELEASE_DATE = '2024-03-11 18:16:44';
public const RELEASE_DATE = '2024-03-12 17:20:21';
/**
* @var int
*/
Expand Down
44 changes: 22 additions & 22 deletions vendor/composer/installed.json
Original file line number Diff line number Diff line change
Expand Up @@ -504,8 +504,8 @@
},
{
"name": "illuminate\/container",
"version": "v10.47.0",
"version_normalized": "10.47.0.0",
"version": "v10.48.1",
"version_normalized": "10.48.1.0",
"source": {
"type": "git",
"url": "https:\/\/github.com\/illuminate\/container.git",
Expand Down Expand Up @@ -561,8 +561,8 @@
},
{
"name": "illuminate\/contracts",
"version": "v10.47.0",
"version_normalized": "10.47.0.0",
"version": "v10.48.1",
"version_normalized": "10.48.1.0",
"source": {
"type": "git",
"url": "https:\/\/github.com\/illuminate\/contracts.git",
Expand Down Expand Up @@ -777,32 +777,32 @@
},
{
"name": "ondram\/ci-detector",
"version": "4.1.0",
"version_normalized": "4.1.0.0",
"version": "4.2.0",
"version_normalized": "4.2.0.0",
"source": {
"type": "git",
"url": "https:\/\/github.com\/OndraM\/ci-detector.git",
"reference": "8a4b664e916df82ff26a44709942dfd593fa6f30"
"reference": "8b0223b5ed235fd377c75fdd1bfcad05c0f168b8"
},
"dist": {
"type": "zip",
"url": "https:\/\/api.github.com\/repos\/OndraM\/ci-detector\/zipball\/8a4b664e916df82ff26a44709942dfd593fa6f30",
"reference": "8a4b664e916df82ff26a44709942dfd593fa6f30",
"url": "https:\/\/api.github.com\/repos\/OndraM\/ci-detector\/zipball\/8b0223b5ed235fd377c75fdd1bfcad05c0f168b8",
"reference": "8b0223b5ed235fd377c75fdd1bfcad05c0f168b8",
"shasum": ""
},
"require": {
"php": "^7.1 || ^8.0"
"php": "^7.4 || ^8.0"
},
"require-dev": {
"ergebnis\/composer-normalize": "^2.2",
"lmc\/coding-standard": "^1.3 || ^2.1",
"ergebnis\/composer-normalize": "^2.13.2",
"lmc\/coding-standard": "^3.0.0",
"php-parallel-lint\/php-parallel-lint": "^1.2",
"phpstan\/extension-installer": "^1.0.5",
"phpstan\/phpstan": "^0.12.58",
"phpstan\/phpstan-phpunit": "^0.12.16",
"phpunit\/phpunit": "^7.1 || ^8.0 || ^9.0"
"phpstan\/extension-installer": "^1.1.0",
"phpstan\/phpstan": "^1.2.0",
"phpstan\/phpstan-phpunit": "^1.0.0",
"phpunit\/phpunit": "^9.6.13"
},
"time": "2021-04-14T09:16:52+00:00",
"time": "2024-03-12T13:22:30+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
Expand Down Expand Up @@ -852,7 +852,7 @@
],
"support": {
"issues": "https:\/\/github.com\/OndraM\/ci-detector\/issues",
"source": "https:\/\/github.com\/OndraM\/ci-detector\/tree\/4.1.0"
"source": "https:\/\/github.com\/OndraM\/ci-detector\/tree\/4.2.0"
},
"install-path": "..\/ondram\/ci-detector"
},
Expand Down Expand Up @@ -1866,12 +1866,12 @@
"source": {
"type": "git",
"url": "https:\/\/github.com\/rectorphp\/rector-symfony.git",
"reference": "5ce789ddc9f145d4d93496db165ef9daa9be4424"
"reference": "c8b64135bdaaec629f2abd81387485cf3a627a3f"
},
"dist": {
"type": "zip",
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-symfony\/zipball\/5ce789ddc9f145d4d93496db165ef9daa9be4424",
"reference": "5ce789ddc9f145d4d93496db165ef9daa9be4424",
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-symfony\/zipball\/c8b64135bdaaec629f2abd81387485cf3a627a3f",
"reference": "c8b64135bdaaec629f2abd81387485cf3a627a3f",
"shasum": ""
},
"require": {
Expand Down Expand Up @@ -1900,7 +1900,7 @@
"tomasvotruba\/class-leak": "^0.2.6",
"tracy\/tracy": "^2.10"
},
"time": "2024-03-05T20:50:16+00:00",
"time": "2024-03-12T11:45:55+00:00",
"default-branch": true,
"type": "rector-extension",
"extra": {
Expand Down
2 changes: 1 addition & 1 deletion vendor/composer/installed.php

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions vendor/ondram/ci-detector/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@

## Unreleased

## 4.2.0 - 2024-03-12
- Require PHP ^7.4.
- Deprecate Wercker, which ceased to exist.

## 4.1.0 - 2021-04-14
- Add SourceHut detection support.

Expand Down
Loading

0 comments on commit 03f122a

Please sign in to comment.