mirror of https://github.com/rectorphp/rector.git
Updated Rector to commit d2bf080d6b
d2bf080d6b
Update PHPStan to ^1.7.10 (#2424)
This commit is contained in:
parent
9537927564
commit
ef1a9b9a7c
|
@ -7,7 +7,7 @@
|
|||
],
|
||||
"require": {
|
||||
"php": "^7.2|^8.0",
|
||||
"phpstan/phpstan": "1.7.8"
|
||||
"phpstan/phpstan": "^1.7.10"
|
||||
},
|
||||
"autoload": {
|
||||
"files": [
|
||||
|
|
|
@ -16,11 +16,11 @@ final class VersionResolver
|
|||
/**
|
||||
* @var string
|
||||
*/
|
||||
public const PACKAGE_VERSION = 'c5f35e4a1d118473ace101d4b73c82d4fc35d6b3';
|
||||
public const PACKAGE_VERSION = 'd2bf080d6be423189793cd325bbc898d0881bab1';
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public const RELEASE_DATE = '2022-06-03 10:05:24';
|
||||
public const RELEASE_DATE = '2022-06-03 22:40:10';
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
|
|
|
@ -9,4 +9,4 @@ if (PHP_VERSION_ID < 50600) {
|
|||
|
||||
require_once __DIR__ . '/composer/autoload_real.php';
|
||||
|
||||
return ComposerAutoloaderInit70d9fa13935352588022b44d3b6a76a8::getLoader();
|
||||
return ComposerAutoloaderInita831d7dadeb69f1c8524e90035a4cf37::getLoader();
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
// autoload_real.php @generated by Composer
|
||||
|
||||
class ComposerAutoloaderInit70d9fa13935352588022b44d3b6a76a8
|
||||
class ComposerAutoloaderInita831d7dadeb69f1c8524e90035a4cf37
|
||||
{
|
||||
private static $loader;
|
||||
|
||||
|
@ -22,19 +22,19 @@ class ComposerAutoloaderInit70d9fa13935352588022b44d3b6a76a8
|
|||
return self::$loader;
|
||||
}
|
||||
|
||||
spl_autoload_register(array('ComposerAutoloaderInit70d9fa13935352588022b44d3b6a76a8', 'loadClassLoader'), true, true);
|
||||
spl_autoload_register(array('ComposerAutoloaderInita831d7dadeb69f1c8524e90035a4cf37', 'loadClassLoader'), true, true);
|
||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInit70d9fa13935352588022b44d3b6a76a8', 'loadClassLoader'));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInita831d7dadeb69f1c8524e90035a4cf37', 'loadClassLoader'));
|
||||
|
||||
require __DIR__ . '/autoload_static.php';
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInit70d9fa13935352588022b44d3b6a76a8::getInitializer($loader));
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInita831d7dadeb69f1c8524e90035a4cf37::getInitializer($loader));
|
||||
|
||||
$loader->setClassMapAuthoritative(true);
|
||||
$loader->register(true);
|
||||
|
||||
$includeFiles = \Composer\Autoload\ComposerStaticInit70d9fa13935352588022b44d3b6a76a8::$files;
|
||||
$includeFiles = \Composer\Autoload\ComposerStaticInita831d7dadeb69f1c8524e90035a4cf37::$files;
|
||||
foreach ($includeFiles as $fileIdentifier => $file) {
|
||||
composerRequire70d9fa13935352588022b44d3b6a76a8($fileIdentifier, $file);
|
||||
composerRequirea831d7dadeb69f1c8524e90035a4cf37($fileIdentifier, $file);
|
||||
}
|
||||
|
||||
return $loader;
|
||||
|
@ -46,7 +46,7 @@ class ComposerAutoloaderInit70d9fa13935352588022b44d3b6a76a8
|
|||
* @param string $file
|
||||
* @return void
|
||||
*/
|
||||
function composerRequire70d9fa13935352588022b44d3b6a76a8($fileIdentifier, $file)
|
||||
function composerRequirea831d7dadeb69f1c8524e90035a4cf37($fileIdentifier, $file)
|
||||
{
|
||||
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
||||
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
namespace Composer\Autoload;
|
||||
|
||||
class ComposerStaticInit70d9fa13935352588022b44d3b6a76a8
|
||||
class ComposerStaticInita831d7dadeb69f1c8524e90035a4cf37
|
||||
{
|
||||
public static $files = array (
|
||||
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
|
||||
|
@ -3795,9 +3795,9 @@ class ComposerStaticInit70d9fa13935352588022b44d3b6a76a8
|
|||
public static function getInitializer(ClassLoader $loader)
|
||||
{
|
||||
return \Closure::bind(function () use ($loader) {
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInit70d9fa13935352588022b44d3b6a76a8::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInit70d9fa13935352588022b44d3b6a76a8::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInit70d9fa13935352588022b44d3b6a76a8::$classMap;
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInita831d7dadeb69f1c8524e90035a4cf37::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInita831d7dadeb69f1c8524e90035a4cf37::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInita831d7dadeb69f1c8524e90035a4cf37::$classMap;
|
||||
|
||||
}, null, ClassLoader::class);
|
||||
}
|
||||
|
|
|
@ -867,17 +867,17 @@
|
|||
},
|
||||
{
|
||||
"name": "phpstan\/phpstan",
|
||||
"version": "1.7.8",
|
||||
"version_normalized": "1.7.8.0",
|
||||
"version": "1.7.10",
|
||||
"version_normalized": "1.7.10.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https:\/\/github.com\/phpstan\/phpstan.git",
|
||||
"reference": "2bf3d43015d56abac4d002a4d2d6c3a7d6fa627a"
|
||||
"reference": "25e069474cf00215b0f64c60a26230908ef3eefa"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https:\/\/api.github.com\/repos\/phpstan\/phpstan\/zipball\/2bf3d43015d56abac4d002a4d2d6c3a7d6fa627a",
|
||||
"reference": "2bf3d43015d56abac4d002a4d2d6c3a7d6fa627a",
|
||||
"url": "https:\/\/api.github.com\/repos\/phpstan\/phpstan\/zipball\/25e069474cf00215b0f64c60a26230908ef3eefa",
|
||||
"reference": "25e069474cf00215b0f64c60a26230908ef3eefa",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -886,7 +886,7 @@
|
|||
"conflict": {
|
||||
"phpstan\/phpstan-shim": "*"
|
||||
},
|
||||
"time": "2022-06-01T13:43:17+00:00",
|
||||
"time": "2022-06-03T14:12:23+00:00",
|
||||
"bin": [
|
||||
"phpstan",
|
||||
"phpstan.phar"
|
||||
|
@ -905,7 +905,7 @@
|
|||
"description": "PHPStan - PHP Static Analysis Tool",
|
||||
"support": {
|
||||
"issues": "https:\/\/github.com\/phpstan\/phpstan\/issues",
|
||||
"source": "https:\/\/github.com\/phpstan\/phpstan\/tree\/1.7.8"
|
||||
"source": "https:\/\/github.com\/phpstan\/phpstan\/tree\/1.7.10"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
|
@ -2554,12 +2554,12 @@
|
|||
"source": {
|
||||
"type": "git",
|
||||
"url": "https:\/\/github.com\/sabbelasichon\/typo3-rector.git",
|
||||
"reference": "30231477ac26fa550f45adfa3d37b94453e6f778"
|
||||
"reference": "a12c65dee10b4f75f024b0dde063399cf7d47392"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https:\/\/api.github.com\/repos\/sabbelasichon\/typo3-rector\/zipball\/30231477ac26fa550f45adfa3d37b94453e6f778",
|
||||
"reference": "30231477ac26fa550f45adfa3d37b94453e6f778",
|
||||
"url": "https:\/\/api.github.com\/repos\/sabbelasichon\/typo3-rector\/zipball\/a12c65dee10b4f75f024b0dde063399cf7d47392",
|
||||
"reference": "a12c65dee10b4f75f024b0dde063399cf7d47392",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -2589,7 +2589,7 @@
|
|||
"symplify\/vendor-patches": "^10.2",
|
||||
"tracy\/tracy": "^2.8"
|
||||
},
|
||||
"time": "2022-06-02T11:25:04+00:00",
|
||||
"time": "2022-06-03T12:34:01+00:00",
|
||||
"default-branch": true,
|
||||
"type": "rector-extension",
|
||||
"extra": {
|
||||
|
@ -4500,22 +4500,22 @@
|
|||
},
|
||||
{
|
||||
"name": "webmozart\/assert",
|
||||
"version": "1.10.0",
|
||||
"version_normalized": "1.10.0.0",
|
||||
"version": "1.11.0",
|
||||
"version_normalized": "1.11.0.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https:\/\/github.com\/webmozarts\/assert.git",
|
||||
"reference": "6964c76c7804814a842473e0c8fd15bab0f18e25"
|
||||
"reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https:\/\/api.github.com\/repos\/webmozarts\/assert\/zipball\/6964c76c7804814a842473e0c8fd15bab0f18e25",
|
||||
"reference": "6964c76c7804814a842473e0c8fd15bab0f18e25",
|
||||
"url": "https:\/\/api.github.com\/repos\/webmozarts\/assert\/zipball\/11cb2199493b2f8a3b53e7f19068fc6aac760991",
|
||||
"reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^7.2 || ^8.0",
|
||||
"symfony\/polyfill-ctype": "^1.8"
|
||||
"ext-ctype": "*",
|
||||
"php": "^7.2 || ^8.0"
|
||||
},
|
||||
"conflict": {
|
||||
"phpstan\/phpstan": "<0.12.20",
|
||||
|
@ -4524,7 +4524,7 @@
|
|||
"require-dev": {
|
||||
"phpunit\/phpunit": "^8.5.13"
|
||||
},
|
||||
"time": "2021-03-09T10:59:23+00:00",
|
||||
"time": "2022-06-03T18:03:27+00:00",
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
|
@ -4555,7 +4555,7 @@
|
|||
],
|
||||
"support": {
|
||||
"issues": "https:\/\/github.com\/webmozarts\/assert\/issues",
|
||||
"source": "https:\/\/github.com\/webmozarts\/assert\/tree\/1.10.0"
|
||||
"source": "https:\/\/github.com\/webmozarts\/assert\/tree\/1.11.0"
|
||||
},
|
||||
"install-path": "..\/webmozart\/assert"
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
Binary file not shown.
|
@ -1,16 +1,16 @@
|
|||
-----BEGIN PGP SIGNATURE-----
|
||||
|
||||
iQIzBAABCgAdFiEE0yaA1ZV9xxFr4pwUzxoQjQ565yAFAmKXbOsACgkQzxoQjQ56
|
||||
5yD4og/+NQS2eMADE0Cpy5vSHDkOohvcQYbIeww8icRup+BU4xHlb5ewakMNGmY3
|
||||
RxWt88QIwy4mfMQ2nUJjo2nogj5+W0clIsJiUjSCFWz+A2IBQAcEAr1pGKwYLYPh
|
||||
9X+7uPP/U+PpaX1hsDfSdNiLmBewwVI7wgLyxuXp1VBzLsZrpVWweuHtY2BmU4gK
|
||||
IMMfE0G4AmdLQYmb84gS7m4egQkE/XtbSbpnFm8251S/h2FvgFYKypQzqEY9ve8B
|
||||
tpQGwNED2nUqHJSHU/7B/uHUuukxFcu/ASMQZ+sfFGqNSN1N6PhW+HmiSizTCbqR
|
||||
rVsl/VGC72I4Fw4ZgIHDC5EIeuSNqwdfFG/ZSpcMO9qbPJFlrTXAFU+1ezi7VXbI
|
||||
VeovhpHx8hz8684m0E7SNbJJdrkeyK3p8R2Bp0nMlI4H6nGp6cj5z5wOwZdggZWK
|
||||
IlLuIVj1z3Hrs7h+xN5WA/ukOSmPOWIsPL8ap+Hz4K+9SRoJTcBLveWHnnwlqXJF
|
||||
Jix5hQCiwsxswhffB4eXYYV6ca2mndL3bTkSieNXJvGawHtMv18NoeMpgyoLpF3T
|
||||
lTv9uErcIfCFB/yJjXp+B348oMFX/ruxrC6aZ653qowQ6s/sSpPQh7wfB1qaCTnT
|
||||
SIoGmIHASLN9c8t7GGrUX7FjUFOZX1Qpiv4t/cNyx41fXlFrVoQ=
|
||||
=dNi2
|
||||
iQIzBAABCgAdFiEE0yaA1ZV9xxFr4pwUzxoQjQ565yAFAmKaFr0ACgkQzxoQjQ56
|
||||
5yAzSw//XoSFoUSf8jkBGLCwFMEgoCL8Qv1tsF2GZZkCdoA3szFqIOxPw5hVdNfc
|
||||
YMJ6VT1ET3KCBcYy4Splp9XTNF53nTm4JEPSAinWCllOIy5DlNkaalr6ViOJc+N8
|
||||
GXM3c8KMqvsY2E94Labuyq5XuhJyGENA4lPyGqEnt5FHaXIR66BBuZVeTz2k/HOZ
|
||||
D4XIHRYgSUa8z1ZA7Q8HHu2AmgUaijGwYxcut5HuO39VZ6TZBvVo09ZO16D2nHpK
|
||||
yHzdf/uJK6LGJhmIIJ/yqWr1puG468VePULTs7/bOFg6fXHUlKw6g20JQEyEROsZ
|
||||
HnRK4juDhv8cmfm7nRQVqhqlsbvLDLSufXKv1R0jhv/e68WOwlMop2C3pBZCd/Xg
|
||||
PNGT8qMbU41i4YVqKnx2O4WaCkQdbPg2bZXppqhPCZdy0sWGxmD1NzY2JEO2AEpm
|
||||
fUJY+EtAFrDSr5lx4lB47zaujsHMp+u9t1HDaOj754Vj6Vy5O/Lr4OwEomU9E/jt
|
||||
DW6aUPMsAGkt5lT8GEyjPJfF+01SZrZasFlT9I28g1ePa0nvfk5H1S8Skh6rVCF5
|
||||
gEz5QAzNLZA1HCja4Hfv8esDpSLu8FU/1oC20NC7NZTo+WDjTdqY63TVDXtAtwIH
|
||||
EArg7z02rEG6MEo3re7/T8fqusvASZCbjC3PZnhNLiPw2kEkFoQ=
|
||||
=tgge
|
||||
-----END PGP SIGNATURE-----
|
||||
|
|
|
@ -9,7 +9,7 @@ namespace Rector\RectorInstaller;
|
|||
*/
|
||||
final class GeneratedConfig
|
||||
{
|
||||
public const EXTENSIONS = array('rector/rector-cakephp' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-cakephp', 'relative_install_path' => '../../rector-cakephp', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 1ba95e5'), 'rector/rector-doctrine' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-doctrine', 'relative_install_path' => '../../rector-doctrine', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main c745427'), 'rector/rector-generator' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-generator', 'relative_install_path' => '../../rector-generator', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 784271e'), 'rector/rector-laravel' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-laravel', 'relative_install_path' => '../../rector-laravel', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main e1d324e'), 'rector/rector-nette' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-nette', 'relative_install_path' => '../../rector-nette', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main b4026b1'), 'rector/rector-phpoffice' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-phpoffice', 'relative_install_path' => '../../rector-phpoffice', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 86b0213'), 'rector/rector-phpunit' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-phpunit', 'relative_install_path' => '../../rector-phpunit', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 31de140'), 'rector/rector-symfony' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-symfony', 'relative_install_path' => '../../rector-symfony', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 6ad431c'), 'ssch/typo3-rector' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/ssch/typo3-rector', 'relative_install_path' => '../../../ssch/typo3-rector', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 3023147'));
|
||||
public const EXTENSIONS = array('rector/rector-cakephp' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-cakephp', 'relative_install_path' => '../../rector-cakephp', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 1ba95e5'), 'rector/rector-doctrine' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-doctrine', 'relative_install_path' => '../../rector-doctrine', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main c745427'), 'rector/rector-generator' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-generator', 'relative_install_path' => '../../rector-generator', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 784271e'), 'rector/rector-laravel' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-laravel', 'relative_install_path' => '../../rector-laravel', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main e1d324e'), 'rector/rector-nette' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-nette', 'relative_install_path' => '../../rector-nette', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main b4026b1'), 'rector/rector-phpoffice' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-phpoffice', 'relative_install_path' => '../../rector-phpoffice', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 86b0213'), 'rector/rector-phpunit' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-phpunit', 'relative_install_path' => '../../rector-phpunit', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 31de140'), 'rector/rector-symfony' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-symfony', 'relative_install_path' => '../../rector-symfony', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 6ad431c'), 'ssch/typo3-rector' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/ssch/typo3-rector', 'relative_install_path' => '../../../ssch/typo3-rector', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main a12c65d'));
|
||||
private function __construct()
|
||||
{
|
||||
}
|
||||
|
|
|
@ -9,8 +9,8 @@ $loader = require_once __DIR__.'/autoload.php';
|
|||
if (!class_exists('AutoloadIncluder', false) && !interface_exists('AutoloadIncluder', false) && !trait_exists('AutoloadIncluder', false)) {
|
||||
spl_autoload_call('RectorPrefix20220603\AutoloadIncluder');
|
||||
}
|
||||
if (!class_exists('ComposerAutoloaderInit70d9fa13935352588022b44d3b6a76a8', false) && !interface_exists('ComposerAutoloaderInit70d9fa13935352588022b44d3b6a76a8', false) && !trait_exists('ComposerAutoloaderInit70d9fa13935352588022b44d3b6a76a8', false)) {
|
||||
spl_autoload_call('RectorPrefix20220603\ComposerAutoloaderInit70d9fa13935352588022b44d3b6a76a8');
|
||||
if (!class_exists('ComposerAutoloaderInita831d7dadeb69f1c8524e90035a4cf37', false) && !interface_exists('ComposerAutoloaderInita831d7dadeb69f1c8524e90035a4cf37', false) && !trait_exists('ComposerAutoloaderInita831d7dadeb69f1c8524e90035a4cf37', false)) {
|
||||
spl_autoload_call('RectorPrefix20220603\ComposerAutoloaderInita831d7dadeb69f1c8524e90035a4cf37');
|
||||
}
|
||||
if (!class_exists('Helmich\TypoScriptParser\Parser\AST\Statement', false) && !interface_exists('Helmich\TypoScriptParser\Parser\AST\Statement', false) && !trait_exists('Helmich\TypoScriptParser\Parser\AST\Statement', false)) {
|
||||
spl_autoload_call('RectorPrefix20220603\Helmich\TypoScriptParser\Parser\AST\Statement');
|
||||
|
@ -59,9 +59,9 @@ if (!function_exists('print_node')) {
|
|||
return \RectorPrefix20220603\print_node(...func_get_args());
|
||||
}
|
||||
}
|
||||
if (!function_exists('composerRequire70d9fa13935352588022b44d3b6a76a8')) {
|
||||
function composerRequire70d9fa13935352588022b44d3b6a76a8() {
|
||||
return \RectorPrefix20220603\composerRequire70d9fa13935352588022b44d3b6a76a8(...func_get_args());
|
||||
if (!function_exists('composerRequirea831d7dadeb69f1c8524e90035a4cf37')) {
|
||||
function composerRequirea831d7dadeb69f1c8524e90035a4cf37() {
|
||||
return \RectorPrefix20220603\composerRequirea831d7dadeb69f1c8524e90035a4cf37(...func_get_args());
|
||||
}
|
||||
}
|
||||
if (!function_exists('scanPath')) {
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -3,6 +3,23 @@ Changelog
|
|||
|
||||
## UNRELEASED
|
||||
|
||||
## 1.11.0
|
||||
|
||||
### Added
|
||||
|
||||
* Added explicit (non magic) `allNullOr*` methods, with `@psalm-assert` annotations, for better Psalm support.
|
||||
|
||||
### Changed
|
||||
|
||||
* Trait methods will now check the assertion themselves, instead of using `__callStatic`
|
||||
* `isList` will now deal correctly with (modified) lists that contain `NaN`
|
||||
* `reportInvalidArgument` now has a return type of `never`.
|
||||
|
||||
### Removed
|
||||
|
||||
* Removed `symfony/polyfill-ctype` as a dependency, and require `ext-cytpe` instead.
|
||||
* You can still require the `symfony/polyfill-ctype` in your project if you need it, as it provides `ext-ctype`
|
||||
|
||||
## 1.10.0
|
||||
|
||||
### Added
|
||||
|
|
|
@ -43,8 +43,8 @@ Installation
|
|||
|
||||
Use [Composer] to install the package:
|
||||
|
||||
```
|
||||
$ composer require webmozart/assert
|
||||
```bash
|
||||
composer require webmozart/assert
|
||||
```
|
||||
|
||||
Example
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "webmozart\/assert",
|
||||
"description": "Assertions to validate method input\/output with nice error messages.",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
"assert",
|
||||
"check",
|
||||
"validate"
|
||||
],
|
||||
"license": "MIT",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Bernhard Schussek",
|
||||
|
@ -15,19 +15,14 @@
|
|||
],
|
||||
"require": {
|
||||
"php": "^7.2 || ^8.0",
|
||||
"symfony\/polyfill-ctype": "^1.8"
|
||||
},
|
||||
"conflict": {
|
||||
"phpstan\/phpstan": "<0.12.20",
|
||||
"vimeo\/psalm": "<4.6.1 || 4.6.2"
|
||||
"ext-ctype": "*"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit\/phpunit": "^8.5.13"
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.10-dev"
|
||||
}
|
||||
"conflict": {
|
||||
"phpstan\/phpstan": "<0.12.20",
|
||||
"vimeo\/psalm": "<4.6.1 || 4.6.2"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
|
@ -39,5 +34,10 @@
|
|||
"RectorPrefix20220603\\Webmozart\\Assert\\Tests\\": "tests\/",
|
||||
"RectorPrefix20220603\\Webmozart\\Assert\\Bin\\": "bin\/src"
|
||||
}
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.10-dev"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,14 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<psalm
|
||||
totallyTyped="true"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns="https://getpsalm.org/schema/config"
|
||||
xsi:schemaLocation="https://getpsalm.org/schema/config ci/vendor/vimeo/psalm/config.xsd"
|
||||
phpVersion="7.3"
|
||||
>
|
||||
<projectFiles>
|
||||
<directory name="bin" />
|
||||
<directory name="tests/static-analysis" />
|
||||
</projectFiles>
|
||||
|
||||
</psalm>
|
|
@ -360,7 +360,7 @@ class Assert
|
|||
return;
|
||||
}
|
||||
}
|
||||
static::reportInvalidArgument(\sprintf($message ?: 'Expected an instance of any of %2$s. Got: %s', static::typeToString($value), \implode(', ', \array_map(array('static', 'valueToString'), $classes))));
|
||||
static::reportInvalidArgument(\sprintf($message ?: 'Expected an instance of any of %2$s. Got: %s', static::typeToString($value), \implode(', ', \array_map(array(static::class, 'valueToString'), $classes))));
|
||||
}
|
||||
/**
|
||||
* @psalm-pure
|
||||
|
@ -378,7 +378,7 @@ class Assert
|
|||
{
|
||||
static::string($class, 'Expected class as a string. Got: %s');
|
||||
if (!\is_a($value, $class, \is_string($value))) {
|
||||
static::reportInvalidArgument(\sprintf($message ?: 'Expected an instance of this class or to this class among his parents %2$s. Got: %s', static::typeToString($value), $class));
|
||||
static::reportInvalidArgument(\sprintf($message ?: 'Expected an instance of this class or to this class among its parents "%2$s". Got: %s', static::valueToString($value), $class));
|
||||
}
|
||||
}
|
||||
/**
|
||||
|
@ -398,7 +398,7 @@ class Assert
|
|||
{
|
||||
static::string($class, 'Expected class as a string. Got: %s');
|
||||
if (\is_a($value, $class, \is_string($value))) {
|
||||
static::reportInvalidArgument(\sprintf($message ?: 'Expected an instance of this class or to this class among his parents other than %2$s. Got: %s', static::typeToString($value), $class));
|
||||
static::reportInvalidArgument(\sprintf($message ?: 'Expected an instance of this class or to this class among its parents other than "%2$s". Got: %s', static::valueToString($value), $class));
|
||||
}
|
||||
}
|
||||
/**
|
||||
|
@ -419,7 +419,7 @@ class Assert
|
|||
return;
|
||||
}
|
||||
}
|
||||
static::reportInvalidArgument(\sprintf($message ?: 'Expected an any of instance of this class or to this class among his parents other than %2$s. Got: %s', static::typeToString($value), \implode(', ', \array_map(array('static', 'valueToString'), $classes))));
|
||||
static::reportInvalidArgument(\sprintf($message ?: 'Expected an instance of any of this classes or any of those classes among their parents "%2$s". Got: %s', static::valueToString($value), \implode(', ', $classes)));
|
||||
}
|
||||
/**
|
||||
* @psalm-pure
|
||||
|
@ -754,7 +754,7 @@ class Assert
|
|||
public static function inArray($value, array $values, $message = '')
|
||||
{
|
||||
if (!\in_array($value, $values, \true)) {
|
||||
static::reportInvalidArgument(\sprintf($message ?: 'Expected one of: %2$s. Got: %s', static::valueToString($value), \implode(', ', \array_map(array('static', 'valueToString'), $values))));
|
||||
static::reportInvalidArgument(\sprintf($message ?: 'Expected one of: %2$s. Got: %s', static::valueToString($value), \implode(', ', \array_map(array(static::class, 'valueToString'), $values))));
|
||||
}
|
||||
}
|
||||
/**
|
||||
|
@ -1400,9 +1400,18 @@ class Assert
|
|||
*/
|
||||
public static function isList($array, $message = '')
|
||||
{
|
||||
if (!\is_array($array) || $array !== \array_values($array)) {
|
||||
if (!\is_array($array)) {
|
||||
static::reportInvalidArgument($message ?: 'Expected list - non-associative array.');
|
||||
}
|
||||
if ($array === \array_values($array)) {
|
||||
return;
|
||||
}
|
||||
$nextKey = -1;
|
||||
foreach ($array as $k => $v) {
|
||||
if ($k !== ++$nextKey) {
|
||||
static::reportInvalidArgument($message ?: 'Expected list - non-associative array.');
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @psalm-pure
|
||||
|
@ -1508,7 +1517,7 @@ class Assert
|
|||
if ('nullOr' === \substr($name, 0, 6)) {
|
||||
if (null !== $arguments[0]) {
|
||||
$method = \lcfirst(\substr($name, 6));
|
||||
\call_user_func_array(array('static', $method), $arguments);
|
||||
\call_user_func_array(array(static::class, $method), $arguments);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
@ -1518,7 +1527,7 @@ class Assert
|
|||
$args = $arguments;
|
||||
foreach ($arguments[0] as $entry) {
|
||||
$args[0] = $entry;
|
||||
\call_user_func_array(array('static', $method), $args);
|
||||
\call_user_func_array(array(static::class, $method), $args);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
@ -1585,6 +1594,7 @@ class Assert
|
|||
* @throws InvalidArgumentException
|
||||
*
|
||||
* @psalm-pure this method is not supposed to perform side-effects
|
||||
* @psalm-return never
|
||||
*/
|
||||
protected static function reportInvalidArgument($message)
|
||||
{
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue