Skip to content

Commit

Permalink
Updated Rector to commit 60047ce7785545401ad870d483060ce640fa3369
Browse files Browse the repository at this point in the history
rectorphp/rector-src@60047ce [Php73] Handle crash on JsonThrowOnErrorRector + SensitiveConstantNameRector (#5253)
  • Loading branch information
TomasVotruba committed Nov 16, 2023
1 parent 0f9778f commit b4cef81
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
9 changes: 4 additions & 5 deletions rules/Php73/Rector/ConstFetch/SensitiveConstantNameRector.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@
use PhpParser\Node\Expr\ConstFetch;
use PhpParser\Node\Name;
use PhpParser\Node\Name\FullyQualified;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\ReflectionProvider;
use Rector\Core\Rector\AbstractScopeAwareRector;
use Rector\Core\Rector\AbstractRector;
use Rector\Core\ValueObject\PhpVersionFeature;
use Rector\VersionBonding\Contract\MinPhpVersionInterface;
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
Expand All @@ -19,7 +18,7 @@
*
* @see \Rector\Tests\Php73\Rector\ConstFetch\SensitiveConstantNameRector\SensitiveConstantNameRectorTest
*/
final class SensitiveConstantNameRector extends AbstractScopeAwareRector implements MinPhpVersionInterface
final class SensitiveConstantNameRector extends AbstractRector implements MinPhpVersionInterface
{
/**
* @readonly
Expand Down Expand Up @@ -63,7 +62,7 @@ public function getNodeTypes() : array
/**
* @param ConstFetch $node
*/
public function refactorWithScope(Node $node, Scope $scope) : ?Node
public function refactor(Node $node) : ?Node
{
$constantName = $this->getName($node);
if ($constantName === null) {
Expand All @@ -75,7 +74,7 @@ public function refactorWithScope(Node $node, Scope $scope) : ?Node
return null;
}
// constant is defined in current lower/upper case
if ($this->reflectionProvider->hasConstant(new Name($constantName), $scope)) {
if ($this->reflectionProvider->hasConstant(new Name($constantName), null)) {
return null;
}
// is uppercase, all good
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 = '52ef7b830be95c27141d893308d7fa27ff4a2290';
public const PACKAGE_VERSION = '60047ce7785545401ad870d483060ce640fa3369';
/**
* @api
* @var string
*/
public const RELEASE_DATE = '2023-11-16 03:11:58';
public const RELEASE_DATE = '2023-11-16 12:34:15';
/**
* @var int
*/
Expand Down

0 comments on commit b4cef81

Please sign in to comment.