Updated Rector to commit c5ac495242295f73aaa0dadad8cfebe901735422

c5ac495242 Revert "[Php80] Keep numeric string as is on StringAnnotationToAttributeMappe…" (#6609)
This commit is contained in:
Tomas Votruba 2024-12-18 18:45:52 +00:00
parent 480c133a14
commit 7180d53b03
5 changed files with 13 additions and 8 deletions

View File

@ -19,12 +19,12 @@ final class VersionResolver
* @api
* @var string
*/
public const PACKAGE_VERSION = '72c537af546dae8970b6db5f79f2a1e617db7f61';
public const PACKAGE_VERSION = 'c5ac495242295f73aaa0dadad8cfebe901735422';
/**
* @api
* @var string
*/
public const RELEASE_DATE = '2024-12-18 18:22:50';
public const RELEASE_DATE = '2024-12-18 18:43:20';
/**
* @var int
*/

View File

@ -6,6 +6,7 @@ namespace Rector\PhpAttribute\AnnotationToAttributeMapper;
use PhpParser\Node\Expr;
use PhpParser\Node\Expr\ConstFetch;
use PhpParser\Node\Name;
use PhpParser\Node\Scalar\Int_;
use PhpParser\Node\Scalar\String_;
use Rector\NodeTypeResolver\Node\AttributeKey;
use Rector\PhpAttribute\Contract\AnnotationToAttributeMapperInterface;
@ -35,6 +36,10 @@ final class StringAnnotationToAttributeMapper implements AnnotationToAttributeMa
if (\strtolower($value) === 'null') {
return new ConstFetch(new Name('null'));
}
// number as string to number
if (\is_numeric($value) && \strlen((string) (int) $value) === \strlen($value)) {
return Int_::fromString($value);
}
if (\strpos($value, "'") !== \false && \strpos($value, "\n") === \false) {
$kind = String_::KIND_DOUBLE_QUOTED;
} else {

View File

@ -1808,12 +1808,12 @@
"source": {
"type": "git",
"url": "https:\/\/github.com\/rectorphp\/rector-phpunit.git",
"reference": "510a99d67f5c77d53c7f0cafaaa9dea0dcbed5eb"
"reference": "4bd1f6ee4a7b55fc09368b5150e886c998a471dd"
},
"dist": {
"type": "zip",
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-phpunit\/zipball\/510a99d67f5c77d53c7f0cafaaa9dea0dcbed5eb",
"reference": "510a99d67f5c77d53c7f0cafaaa9dea0dcbed5eb",
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-phpunit\/zipball\/4bd1f6ee4a7b55fc09368b5150e886c998a471dd",
"reference": "4bd1f6ee4a7b55fc09368b5150e886c998a471dd",
"shasum": ""
},
"require": {
@ -1834,7 +1834,7 @@
"tomasvotruba\/class-leak": "^1.2",
"tracy\/tracy": "^2.10"
},
"time": "2024-12-10T12:47:41+00:00",
"time": "2024-12-18T18:36:00+00:00",
"default-branch": true,
"type": "rector-extension",
"extra": {

File diff suppressed because one or more lines are too long

View File

@ -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 00ef1cd'), '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 7b990bd'), '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 510a99d'), '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 29a1abf'));
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 00ef1cd'), '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 7b990bd'), '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 4bd1f6e'), '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 29a1abf'));
private function __construct()
{
}