diff --git a/rules/TypeDeclaration/NodeAnalyzer/CallerParamMatcher.php b/rules/TypeDeclaration/NodeAnalyzer/CallerParamMatcher.php index 75906f33f202..8e170e9f6e0c 100644 --- a/rules/TypeDeclaration/NodeAnalyzer/CallerParamMatcher.php +++ b/rules/TypeDeclaration/NodeAnalyzer/CallerParamMatcher.php @@ -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; @@ -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) { @@ -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; + } } diff --git a/src/Application/FileProcessor.php b/src/Application/FileProcessor.php index 427e912ffb36..f9be15f01618 100644 --- a/src/Application/FileProcessor.php +++ b/src/Application/FileProcessor.php @@ -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; @@ -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 { /** diff --git a/src/Application/VersionResolver.php b/src/Application/VersionResolver.php index 193753e17ecf..51358faa6eee 100644 --- a/src/Application/VersionResolver.php +++ b/src/Application/VersionResolver.php @@ -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 */ diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index 3a54bec46475..8bef151962e9 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -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", @@ -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", @@ -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": { @@ -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" }, @@ -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": { @@ -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": { diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php index 78b5fe951d47..17d8fb127bd5 100644 --- a/vendor/composer/installed.php +++ b/vendor/composer/installed.php @@ -2,4 +2,4 @@ namespace RectorPrefix202403; -return array('root' => array('name' => 'rector/rector-src', 'pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => null, 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), 'dev' => \false), 'versions' => array('clue/ndjson-react' => array('pretty_version' => 'v1.3.0', 'version' => '1.3.0.0', 'reference' => '392dc165fce93b5bb5c637b67e59619223c931b0', 'type' => 'library', 'install_path' => __DIR__ . '/../clue/ndjson-react', 'aliases' => array(), 'dev_requirement' => \false), 'composer/pcre' => array('pretty_version' => '3.1.2', 'version' => '3.1.2.0', 'reference' => '4775f35b2d70865807c89d32c8e7385b86eb0ace', 'type' => 'library', 'install_path' => __DIR__ . '/./pcre', 'aliases' => array(), 'dev_requirement' => \false), 'composer/semver' => array('pretty_version' => '3.4.0', 'version' => '3.4.0.0', 'reference' => '35e8d0af4486141bc745f23a29cc2091eb624a32', 'type' => 'library', 'install_path' => __DIR__ . '/./semver', 'aliases' => array(), 'dev_requirement' => \false), 'composer/xdebug-handler' => array('pretty_version' => '3.0.3', 'version' => '3.0.3.0', 'reference' => 'ced299686f41dce890debac69273b47ffe98a40c', 'type' => 'library', 'install_path' => __DIR__ . '/./xdebug-handler', 'aliases' => array(), 'dev_requirement' => \false), 'doctrine/inflector' => array('pretty_version' => '2.0.10', 'version' => '2.0.10.0', 'reference' => '5817d0659c5b50c9b950feb9af7b9668e2c436bc', 'type' => 'library', 'install_path' => __DIR__ . '/../doctrine/inflector', 'aliases' => array(), 'dev_requirement' => \false), 'evenement/evenement' => array('pretty_version' => 'v3.0.2', 'version' => '3.0.2.0', 'reference' => '0a16b0d71ab13284339abb99d9d2bd813640efbc', 'type' => 'library', 'install_path' => __DIR__ . '/../evenement/evenement', 'aliases' => array(), 'dev_requirement' => \false), 'fidry/cpu-core-counter' => array('pretty_version' => '1.1.0', 'version' => '1.1.0.0', 'reference' => 'f92996c4d5c1a696a6a970e20f7c4216200fcc42', 'type' => 'library', 'install_path' => __DIR__ . '/../fidry/cpu-core-counter', 'aliases' => array(), 'dev_requirement' => \false), 'illuminate/container' => array('pretty_version' => 'v10.47.0', 'version' => '10.47.0.0', 'reference' => 'ddc26273085fad3c471b2602ad820e0097ff7939', 'type' => 'library', 'install_path' => __DIR__ . '/../illuminate/container', 'aliases' => array(), 'dev_requirement' => \false), 'illuminate/contracts' => array('pretty_version' => 'v10.47.0', 'version' => '10.47.0.0', 'reference' => '8d7152c4a1f5d9cf7da3e8b71f23e4556f6138ac', 'type' => 'library', 'install_path' => __DIR__ . '/../illuminate/contracts', 'aliases' => array(), 'dev_requirement' => \false), 'nette/utils' => array('pretty_version' => 'v3.2.10', 'version' => '3.2.10.0', 'reference' => 'a4175c62652f2300c8017fb7e640f9ccb11648d2', 'type' => 'library', 'install_path' => __DIR__ . '/../nette/utils', 'aliases' => array(), 'dev_requirement' => \false), 'nikic/php-parser' => array('pretty_version' => 'v4.18.0', 'version' => '4.18.0.0', 'reference' => '1bcbb2179f97633e98bbbc87044ee2611c7d7999', 'type' => 'library', 'install_path' => __DIR__ . '/../nikic/php-parser', 'aliases' => array(), 'dev_requirement' => \false), 'ondram/ci-detector' => array('pretty_version' => '4.1.0', 'version' => '4.1.0.0', 'reference' => '8a4b664e916df82ff26a44709942dfd593fa6f30', 'type' => 'library', 'install_path' => __DIR__ . '/../ondram/ci-detector', 'aliases' => array(), 'dev_requirement' => \false), 'phpstan/phpdoc-parser' => array('pretty_version' => '1.26.0', 'version' => '1.26.0.0', 'reference' => '231e3186624c03d7e7c890ec662b81e6b0405227', 'type' => 'library', 'install_path' => __DIR__ . '/../phpstan/phpdoc-parser', 'aliases' => array(), 'dev_requirement' => \false), 'phpstan/phpstan' => array('dev_requirement' => \false, 'replaced' => array(0 => '^1.10.57')), 'psr/container' => array('pretty_version' => '2.0.2', 'version' => '2.0.2.0', 'reference' => 'c71ecc56dfe541dbd90c5360474fbc405f8d5963', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/container', 'aliases' => array(), 'dev_requirement' => \false), 'psr/container-implementation' => array('dev_requirement' => \false, 'provided' => array(0 => '1.1|2.0')), 'psr/log' => array('pretty_version' => '3.0.0', 'version' => '3.0.0.0', 'reference' => 'fe5ea303b0887d5caefd3d431c3e61ad47037001', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/log', 'aliases' => array(), 'dev_requirement' => \false), 'psr/log-implementation' => array('dev_requirement' => \false, 'provided' => array(0 => '1.0|2.0|3.0')), 'psr/simple-cache' => array('pretty_version' => '3.0.0', 'version' => '3.0.0.0', 'reference' => '764e0b3939f5ca87cb904f570ef9be2d78a07865', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/simple-cache', 'aliases' => array(), 'dev_requirement' => \false), 'react/cache' => array('pretty_version' => 'v1.2.0', 'version' => '1.2.0.0', 'reference' => 'd47c472b64aa5608225f47965a484b75c7817d5b', 'type' => 'library', 'install_path' => __DIR__ . '/../react/cache', 'aliases' => array(), 'dev_requirement' => \false), 'react/child-process' => array('pretty_version' => 'v0.6.5', 'version' => '0.6.5.0', 'reference' => 'e71eb1aa55f057c7a4a0d08d06b0b0a484bead43', 'type' => 'library', 'install_path' => __DIR__ . '/../react/child-process', 'aliases' => array(), 'dev_requirement' => \false), 'react/dns' => array('pretty_version' => 'v1.12.0', 'version' => '1.12.0.0', 'reference' => 'c134600642fa615b46b41237ef243daa65bb64ec', 'type' => 'library', 'install_path' => __DIR__ . '/../react/dns', 'aliases' => array(), 'dev_requirement' => \false), 'react/event-loop' => array('pretty_version' => 'v1.5.0', 'version' => '1.5.0.0', 'reference' => 'bbe0bd8c51ffc05ee43f1729087ed3bdf7d53354', 'type' => 'library', 'install_path' => __DIR__ . '/../react/event-loop', 'aliases' => array(), 'dev_requirement' => \false), 'react/promise' => array('pretty_version' => 'v2.11.0', 'version' => '2.11.0.0', 'reference' => '1a8460931ea36dc5c76838fec5734d55c88c6831', 'type' => 'library', 'install_path' => __DIR__ . '/../react/promise', 'aliases' => array(), 'dev_requirement' => \false), 'react/socket' => array('pretty_version' => 'v1.15.0', 'version' => '1.15.0.0', 'reference' => '216d3aec0b87f04a40ca04f481e6af01bdd1d038', 'type' => 'library', 'install_path' => __DIR__ . '/../react/socket', 'aliases' => array(), 'dev_requirement' => \false), 'react/stream' => array('pretty_version' => 'v1.3.0', 'version' => '1.3.0.0', 'reference' => '6fbc9672905c7d5a885f2da2fc696f65840f4a66', 'type' => 'library', 'install_path' => __DIR__ . '/../react/stream', 'aliases' => array(), 'dev_requirement' => \false), 'rector/extension-installer' => array('pretty_version' => '0.11.2', 'version' => '0.11.2.0', 'reference' => '05544e9b195863b8571ae2a3b903cbec7fa062e0', 'type' => 'composer-plugin', 'install_path' => __DIR__ . '/../rector/extension-installer', 'aliases' => array(), 'dev_requirement' => \false), 'rector/rector' => array('dev_requirement' => \false, 'replaced' => array(0 => 'dev-main')), 'rector/rector-doctrine' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => 'a1d50bb1b3d158961293ef0828fffb1058cdb32f', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-doctrine', 'aliases' => array(0 => '9999999-dev'), 'dev_requirement' => \false), 'rector/rector-downgrade-php' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => '9a6a85b2b37c51a5c83414269dc2aab09650967f', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-downgrade-php', 'aliases' => array(0 => '9999999-dev'), 'dev_requirement' => \false), 'rector/rector-phpunit' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => '6845db43ccd69ef990d399ff845a53ad66fa8085', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-phpunit', 'aliases' => array(0 => '0.11.x-dev'), 'dev_requirement' => \false), 'rector/rector-src' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => null, 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), 'dev_requirement' => \false), 'rector/rector-symfony' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => '5ce789ddc9f145d4d93496db165ef9daa9be4424', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-symfony', 'aliases' => array(0 => '9999999-dev'), 'dev_requirement' => \false), 'sebastian/diff' => array('pretty_version' => '5.1.1', 'version' => '5.1.1.0', 'reference' => 'c41e007b4b62af48218231d6c2275e4c9b975b2e', 'type' => 'library', 'install_path' => __DIR__ . '/../sebastian/diff', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/console' => array('pretty_version' => 'v6.4.4', 'version' => '6.4.4.0', 'reference' => '0d9e4eb5ad413075624378f474c4167ea202de78', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/console', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/deprecation-contracts' => array('pretty_version' => 'v3.4.0', 'version' => '3.4.0.0', 'reference' => '7c3aff79d10325257a001fcf92d991f24fc967cf', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/deprecation-contracts', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/filesystem' => array('pretty_version' => 'v6.4.3', 'version' => '6.4.3.0', 'reference' => '7f3b1755eb49297a0827a7575d5d2b2fd11cc9fb', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/filesystem', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/finder' => array('pretty_version' => 'v6.4.0', 'version' => '6.4.0.0', 'reference' => '11d736e97f116ac375a81f96e662911a34cd50ce', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/finder', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/polyfill-ctype' => array('dev_requirement' => \false, 'replaced' => array(0 => '*')), 'symfony/polyfill-intl-grapheme' => array('dev_requirement' => \false, 'replaced' => array(0 => '*')), 'symfony/polyfill-mbstring' => array('pretty_version' => 'v1.29.0', 'version' => '1.29.0.0', 'reference' => '9773676c8a1bb1f8d4340a62efe641cf76eda7ec', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-mbstring', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/process' => array('pretty_version' => 'v6.4.4', 'version' => '6.4.4.0', 'reference' => '710e27879e9be3395de2b98da3f52a946039f297', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/process', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/service-contracts' => array('pretty_version' => 'v3.4.1', 'version' => '3.4.1.0', 'reference' => 'fe07cbc8d837f60caf7018068e350cc5163681a0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/service-contracts', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/string' => array('dev_requirement' => \false, 'replaced' => array(0 => '*')), 'symfony/yaml' => array('pretty_version' => 'v6.4.3', 'version' => '6.4.3.0', 'reference' => 'd75715985f0f94f978e3a8fa42533e10db921b90', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/yaml', 'aliases' => array(), 'dev_requirement' => \false), 'symplify/easy-parallel' => array('pretty_version' => '11.2.2', 'version' => '11.2.2.0', 'reference' => '8586c18bb8efb31cd192a4e5cc94ae7813f72ed9', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/easy-parallel', 'aliases' => array(), 'dev_requirement' => \false), 'symplify/rule-doc-generator-contracts' => array('pretty_version' => '11.1.26', 'version' => '11.1.26.0', 'reference' => '3e66b3fec678b74a076395ec629d535fb95293b5', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/rule-doc-generator-contracts', 'aliases' => array(), 'dev_requirement' => \false), 'webmozart/assert' => array('pretty_version' => '1.11.0', 'version' => '1.11.0.0', 'reference' => '11cb2199493b2f8a3b53e7f19068fc6aac760991', 'type' => 'library', 'install_path' => __DIR__ . '/../webmozart/assert', 'aliases' => array(), 'dev_requirement' => \false))); +return array('root' => array('name' => 'rector/rector-src', 'pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => null, 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), 'dev' => \false), 'versions' => array('clue/ndjson-react' => array('pretty_version' => 'v1.3.0', 'version' => '1.3.0.0', 'reference' => '392dc165fce93b5bb5c637b67e59619223c931b0', 'type' => 'library', 'install_path' => __DIR__ . '/../clue/ndjson-react', 'aliases' => array(), 'dev_requirement' => \false), 'composer/pcre' => array('pretty_version' => '3.1.2', 'version' => '3.1.2.0', 'reference' => '4775f35b2d70865807c89d32c8e7385b86eb0ace', 'type' => 'library', 'install_path' => __DIR__ . '/./pcre', 'aliases' => array(), 'dev_requirement' => \false), 'composer/semver' => array('pretty_version' => '3.4.0', 'version' => '3.4.0.0', 'reference' => '35e8d0af4486141bc745f23a29cc2091eb624a32', 'type' => 'library', 'install_path' => __DIR__ . '/./semver', 'aliases' => array(), 'dev_requirement' => \false), 'composer/xdebug-handler' => array('pretty_version' => '3.0.3', 'version' => '3.0.3.0', 'reference' => 'ced299686f41dce890debac69273b47ffe98a40c', 'type' => 'library', 'install_path' => __DIR__ . '/./xdebug-handler', 'aliases' => array(), 'dev_requirement' => \false), 'doctrine/inflector' => array('pretty_version' => '2.0.10', 'version' => '2.0.10.0', 'reference' => '5817d0659c5b50c9b950feb9af7b9668e2c436bc', 'type' => 'library', 'install_path' => __DIR__ . '/../doctrine/inflector', 'aliases' => array(), 'dev_requirement' => \false), 'evenement/evenement' => array('pretty_version' => 'v3.0.2', 'version' => '3.0.2.0', 'reference' => '0a16b0d71ab13284339abb99d9d2bd813640efbc', 'type' => 'library', 'install_path' => __DIR__ . '/../evenement/evenement', 'aliases' => array(), 'dev_requirement' => \false), 'fidry/cpu-core-counter' => array('pretty_version' => '1.1.0', 'version' => '1.1.0.0', 'reference' => 'f92996c4d5c1a696a6a970e20f7c4216200fcc42', 'type' => 'library', 'install_path' => __DIR__ . '/../fidry/cpu-core-counter', 'aliases' => array(), 'dev_requirement' => \false), 'illuminate/container' => array('pretty_version' => 'v10.48.1', 'version' => '10.48.1.0', 'reference' => 'ddc26273085fad3c471b2602ad820e0097ff7939', 'type' => 'library', 'install_path' => __DIR__ . '/../illuminate/container', 'aliases' => array(), 'dev_requirement' => \false), 'illuminate/contracts' => array('pretty_version' => 'v10.48.1', 'version' => '10.48.1.0', 'reference' => '8d7152c4a1f5d9cf7da3e8b71f23e4556f6138ac', 'type' => 'library', 'install_path' => __DIR__ . '/../illuminate/contracts', 'aliases' => array(), 'dev_requirement' => \false), 'nette/utils' => array('pretty_version' => 'v3.2.10', 'version' => '3.2.10.0', 'reference' => 'a4175c62652f2300c8017fb7e640f9ccb11648d2', 'type' => 'library', 'install_path' => __DIR__ . '/../nette/utils', 'aliases' => array(), 'dev_requirement' => \false), 'nikic/php-parser' => array('pretty_version' => 'v4.18.0', 'version' => '4.18.0.0', 'reference' => '1bcbb2179f97633e98bbbc87044ee2611c7d7999', 'type' => 'library', 'install_path' => __DIR__ . '/../nikic/php-parser', 'aliases' => array(), 'dev_requirement' => \false), 'ondram/ci-detector' => array('pretty_version' => '4.2.0', 'version' => '4.2.0.0', 'reference' => '8b0223b5ed235fd377c75fdd1bfcad05c0f168b8', 'type' => 'library', 'install_path' => __DIR__ . '/../ondram/ci-detector', 'aliases' => array(), 'dev_requirement' => \false), 'phpstan/phpdoc-parser' => array('pretty_version' => '1.26.0', 'version' => '1.26.0.0', 'reference' => '231e3186624c03d7e7c890ec662b81e6b0405227', 'type' => 'library', 'install_path' => __DIR__ . '/../phpstan/phpdoc-parser', 'aliases' => array(), 'dev_requirement' => \false), 'phpstan/phpstan' => array('dev_requirement' => \false, 'replaced' => array(0 => '^1.10.57')), 'psr/container' => array('pretty_version' => '2.0.2', 'version' => '2.0.2.0', 'reference' => 'c71ecc56dfe541dbd90c5360474fbc405f8d5963', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/container', 'aliases' => array(), 'dev_requirement' => \false), 'psr/container-implementation' => array('dev_requirement' => \false, 'provided' => array(0 => '1.1|2.0')), 'psr/log' => array('pretty_version' => '3.0.0', 'version' => '3.0.0.0', 'reference' => 'fe5ea303b0887d5caefd3d431c3e61ad47037001', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/log', 'aliases' => array(), 'dev_requirement' => \false), 'psr/log-implementation' => array('dev_requirement' => \false, 'provided' => array(0 => '1.0|2.0|3.0')), 'psr/simple-cache' => array('pretty_version' => '3.0.0', 'version' => '3.0.0.0', 'reference' => '764e0b3939f5ca87cb904f570ef9be2d78a07865', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/simple-cache', 'aliases' => array(), 'dev_requirement' => \false), 'react/cache' => array('pretty_version' => 'v1.2.0', 'version' => '1.2.0.0', 'reference' => 'd47c472b64aa5608225f47965a484b75c7817d5b', 'type' => 'library', 'install_path' => __DIR__ . '/../react/cache', 'aliases' => array(), 'dev_requirement' => \false), 'react/child-process' => array('pretty_version' => 'v0.6.5', 'version' => '0.6.5.0', 'reference' => 'e71eb1aa55f057c7a4a0d08d06b0b0a484bead43', 'type' => 'library', 'install_path' => __DIR__ . '/../react/child-process', 'aliases' => array(), 'dev_requirement' => \false), 'react/dns' => array('pretty_version' => 'v1.12.0', 'version' => '1.12.0.0', 'reference' => 'c134600642fa615b46b41237ef243daa65bb64ec', 'type' => 'library', 'install_path' => __DIR__ . '/../react/dns', 'aliases' => array(), 'dev_requirement' => \false), 'react/event-loop' => array('pretty_version' => 'v1.5.0', 'version' => '1.5.0.0', 'reference' => 'bbe0bd8c51ffc05ee43f1729087ed3bdf7d53354', 'type' => 'library', 'install_path' => __DIR__ . '/../react/event-loop', 'aliases' => array(), 'dev_requirement' => \false), 'react/promise' => array('pretty_version' => 'v2.11.0', 'version' => '2.11.0.0', 'reference' => '1a8460931ea36dc5c76838fec5734d55c88c6831', 'type' => 'library', 'install_path' => __DIR__ . '/../react/promise', 'aliases' => array(), 'dev_requirement' => \false), 'react/socket' => array('pretty_version' => 'v1.15.0', 'version' => '1.15.0.0', 'reference' => '216d3aec0b87f04a40ca04f481e6af01bdd1d038', 'type' => 'library', 'install_path' => __DIR__ . '/../react/socket', 'aliases' => array(), 'dev_requirement' => \false), 'react/stream' => array('pretty_version' => 'v1.3.0', 'version' => '1.3.0.0', 'reference' => '6fbc9672905c7d5a885f2da2fc696f65840f4a66', 'type' => 'library', 'install_path' => __DIR__ . '/../react/stream', 'aliases' => array(), 'dev_requirement' => \false), 'rector/extension-installer' => array('pretty_version' => '0.11.2', 'version' => '0.11.2.0', 'reference' => '05544e9b195863b8571ae2a3b903cbec7fa062e0', 'type' => 'composer-plugin', 'install_path' => __DIR__ . '/../rector/extension-installer', 'aliases' => array(), 'dev_requirement' => \false), 'rector/rector' => array('dev_requirement' => \false, 'replaced' => array(0 => 'dev-main')), 'rector/rector-doctrine' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => 'a1d50bb1b3d158961293ef0828fffb1058cdb32f', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-doctrine', 'aliases' => array(0 => '9999999-dev'), 'dev_requirement' => \false), 'rector/rector-downgrade-php' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => '9a6a85b2b37c51a5c83414269dc2aab09650967f', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-downgrade-php', 'aliases' => array(0 => '9999999-dev'), 'dev_requirement' => \false), 'rector/rector-phpunit' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => '6845db43ccd69ef990d399ff845a53ad66fa8085', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-phpunit', 'aliases' => array(0 => '0.11.x-dev'), 'dev_requirement' => \false), 'rector/rector-src' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => null, 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), 'dev_requirement' => \false), 'rector/rector-symfony' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => 'c8b64135bdaaec629f2abd81387485cf3a627a3f', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-symfony', 'aliases' => array(0 => '9999999-dev'), 'dev_requirement' => \false), 'sebastian/diff' => array('pretty_version' => '5.1.1', 'version' => '5.1.1.0', 'reference' => 'c41e007b4b62af48218231d6c2275e4c9b975b2e', 'type' => 'library', 'install_path' => __DIR__ . '/../sebastian/diff', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/console' => array('pretty_version' => 'v6.4.4', 'version' => '6.4.4.0', 'reference' => '0d9e4eb5ad413075624378f474c4167ea202de78', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/console', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/deprecation-contracts' => array('pretty_version' => 'v3.4.0', 'version' => '3.4.0.0', 'reference' => '7c3aff79d10325257a001fcf92d991f24fc967cf', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/deprecation-contracts', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/filesystem' => array('pretty_version' => 'v6.4.3', 'version' => '6.4.3.0', 'reference' => '7f3b1755eb49297a0827a7575d5d2b2fd11cc9fb', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/filesystem', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/finder' => array('pretty_version' => 'v6.4.0', 'version' => '6.4.0.0', 'reference' => '11d736e97f116ac375a81f96e662911a34cd50ce', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/finder', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/polyfill-ctype' => array('dev_requirement' => \false, 'replaced' => array(0 => '*')), 'symfony/polyfill-intl-grapheme' => array('dev_requirement' => \false, 'replaced' => array(0 => '*')), 'symfony/polyfill-mbstring' => array('pretty_version' => 'v1.29.0', 'version' => '1.29.0.0', 'reference' => '9773676c8a1bb1f8d4340a62efe641cf76eda7ec', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-mbstring', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/process' => array('pretty_version' => 'v6.4.4', 'version' => '6.4.4.0', 'reference' => '710e27879e9be3395de2b98da3f52a946039f297', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/process', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/service-contracts' => array('pretty_version' => 'v3.4.1', 'version' => '3.4.1.0', 'reference' => 'fe07cbc8d837f60caf7018068e350cc5163681a0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/service-contracts', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/string' => array('dev_requirement' => \false, 'replaced' => array(0 => '*')), 'symfony/yaml' => array('pretty_version' => 'v6.4.3', 'version' => '6.4.3.0', 'reference' => 'd75715985f0f94f978e3a8fa42533e10db921b90', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/yaml', 'aliases' => array(), 'dev_requirement' => \false), 'symplify/easy-parallel' => array('pretty_version' => '11.2.2', 'version' => '11.2.2.0', 'reference' => '8586c18bb8efb31cd192a4e5cc94ae7813f72ed9', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/easy-parallel', 'aliases' => array(), 'dev_requirement' => \false), 'symplify/rule-doc-generator-contracts' => array('pretty_version' => '11.1.26', 'version' => '11.1.26.0', 'reference' => '3e66b3fec678b74a076395ec629d535fb95293b5', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/rule-doc-generator-contracts', 'aliases' => array(), 'dev_requirement' => \false), 'webmozart/assert' => array('pretty_version' => '1.11.0', 'version' => '1.11.0.0', 'reference' => '11cb2199493b2f8a3b53e7f19068fc6aac760991', 'type' => 'library', 'install_path' => __DIR__ . '/../webmozart/assert', 'aliases' => array(), 'dev_requirement' => \false))); diff --git a/vendor/ondram/ci-detector/CHANGELOG.md b/vendor/ondram/ci-detector/CHANGELOG.md index a5813705b339..128b6a6df415 100644 --- a/vendor/ondram/ci-detector/CHANGELOG.md +++ b/vendor/ondram/ci-detector/CHANGELOG.md @@ -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. diff --git a/vendor/ondram/ci-detector/README.md b/vendor/ondram/ci-detector/README.md index d2f646655518..e4981f833d2b 100644 --- a/vendor/ondram/ci-detector/README.md +++ b/vendor/ondram/ci-detector/README.md @@ -3,18 +3,19 @@ [![Latest Stable Version](https://img.shields.io/packagist/v/ondram/ci-detector.svg?style=flat-square)](https://packagist.org/packages/ondram/ci-detector) [![Packagist Downloads](https://img.shields.io/packagist/dt/OndraM/ci-detector?style=flat-square)](https://packagist.org/packages/ondram/ci-detector) [![Coverage Status](https://img.shields.io/coveralls/OndraM/ci-detector/main.svg?style=flat-square)](https://coveralls.io/r/OndraM/ci-detector) -[![GitHub Actions Build Status](https://img.shields.io/github/workflow/status/OndraM/ci-detector/Tests%20and%20linting?style=flat-square&label=GitHub%20Actions%20build)](https://github.com/OndraM/ci-detector/actions) -[![Travis Build Status](https://img.shields.io/travis/com/OndraM/ci-detector.svg?style=flat-square&label=Travis%20build)](https://travis-ci.com/OndraM/ci-detector) +[![GitHub Actions Build Status](https://img.shields.io/github/actions/workflow/status/OndraM/ci-detector/tests.yaml?style=flat-square&label=GitHub%20Actions%20build)](https://github.com/OndraM/ci-detector/actions) +[![Travis Build Status](https://img.shields.io/travis/com/OndraM/ci-detector.svg?style=flat-square&label=Travis%20build)](https://app.travis-ci.com/OndraM/ci-detector) [![AppVeyor Build Status](https://img.shields.io/appveyor/ci/OndraM/ci-detector.svg?style=flat-square&label=AppVeyor%20build)](https://ci.appveyor.com/project/OndraM/ci-detector) -PHP library to detect continuous integration environment and to provide a unified interface to read the build information. +PHP library to detect continuous integration environment and to read information of the current build. ## Why This library is useful if you need to detect whether some CLI script/tool is running in an automated environment (on a CI server). -Based on that, your script may behave differently (for example hide some information which relevant only for a real person - like status bar, etc.). +Based on that, your script may behave differently. For example, it could hide some information which relevant only for +a real person - like a progress bar. -Plus, you may want to detect some information about the current build: build ID, git commit, branch etc. +Additionally, you may want to detect some information about the current build: build ID, git commit, branch etc. For example, if you'd like to record these values to log, publish them to Slack, etc. ## How @@ -28,23 +29,23 @@ build environments. These CI servers are currently recognized: - - [AppVeyor](https://www.appveyor.com/) - - [AWS CodeBuild](https://aws.amazon.com/codebuild/) - - [Azure DevOps Pipelines](https://azure.microsoft.com/en-us/services/devops/pipelines/) - - [Bamboo](https://www.atlassian.com/software/bamboo) - - [Bitbucket Pipelines](https://bitbucket.org/product/features/pipelines) - - [Buddy](https://buddy.works/) - - [CircleCI](https://circleci.com/) - - [Codeship](https://codeship.com/) - - [continuousphp](https://continuousphp.com/) - - [drone](https://drone.io/) - - [GitHub Actions](https://github.com/features/actions) - - [GitLab](https://about.gitlab.com/gitlab-ci/) - - [Jenkins](https://www.jenkins.io/) - - [SourceHut](https://sourcehut.org/) - - [TeamCity](https://www.jetbrains.com/teamcity/) - - [Travis CI](https://travis-ci.org/) - - [Wercker](https://devcenter.wercker.com/) + - [AppVeyor][appveyor] + - [AWS CodeBuild][aws-codebuild] + - [Azure DevOps Pipelines][azure-pipelines] + - [Bamboo][bamboo] + - [Bitbucket Pipelines][bitbucket] + - [Buddy][buddy] + - [CircleCI][circleci] + - [Codeship][codeship] + - continuousphp + - [drone][drone] + - [GitHub Actions][github-actions] + - [GitLab][gitlab] + - [Jenkins][jenkins] + - [SourceHut][sourcehut] + - [TeamCity][teamcity] + - [Travis CI][travis-ci] + - Wercker If your favorite CI server is missing, feel free to send a pull-request! @@ -56,8 +57,6 @@ Install using [Composer](https://getcomposer.org/): $ composer require ondram/ci-detector ``` -Ci-detector requires PHP 7.1+, but if you need compatibility with PHP <7.1, you can still use old ci-detector version 2.x. - ## Example usage ```php @@ -65,9 +64,9 @@ Ci-detector requires PHP 7.1+, but if you need compatibility with PHP <7.1, you $ciDetector = new \OndraM\CiDetector\CiDetector(); -if ($ciDetector->isCiDetected()) { // Make sure we are on CI environment +if ($ciDetector->isCiDetected()) { // Make sure we are on CI environment echo 'You are running this script on CI server!'; - $ci = $ciDetector->detect(); // Returns class implementing CiInterface or throws CiNotDetectedException + $ci = $ciDetector->detect(); // Returns class implementing CiInterface or throws CiNotDetectedException // Example output when run inside GitHub Actions build: echo $ci->getCiName(); // "GitHub Actions" @@ -109,43 +108,43 @@ if ($ciDetector->isCiDetected()) { // Make sure we are on CI environment Available methods of `CiInterface` instance (returned from `$ciDetector->detect()`): -| Method | Example value | Description | -|-----------------------|------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| `getCiName()` | `GitHub Actions` | Name of the CI server.
The value is one of `CiDetector::CI_*` constants. | -| `getBuildNumber()` | `33` | Get number of this concrete build.
Build number is usually human-readable increasing number sequence. It should increase each time this particular job was run on the CI server. Most CIs use simple numbering sequence like: 1, 2, 3... However, some CIs do not provide this simple human-readable value and rather use for example alphanumeric hash. | -| `getBuildUrl()` | `https://github.com/OndraM/ci-detector/commit/abcd/checks`
or empty string | Get URL where this build can be found and viewed or empty string if it cannot be determined. | -| `getCommit()` | `b9173d94(...)` | Get hash of the git (or other VCS) commit being built. | -| `getBranch()` | `my-feature`
or empty string | Get name of the git (or other VCS) branch which is being built or empty string if it cannot be determined.
Use `getTargetBranch()` to get name of the branch where this branch is targeted. | -| `getTargetBranch()` | `main`
or empty string | Get name of the target branch of a pull request or empty string if it cannot be determined.
This is the base branch to which the pull request is targeted. | -| `getRepositoryName()` | `OndraM/ci-detector`
or empty string | Get name of the git (or other VCS) repository which is being built or empty string if it cannot be determined.
This is usually in form "user/repository", for example `OndraM/ci-detector`. | -| `getRepositoryUrl()` | `https://github.com/OndraM/ci-detector`
or empty string | Get URL where the repository which is being built can be found or empty string if it cannot be determined.
This is either HTTP URL like `https://github.com/OndraM/ci-detector` but may be a git ssh url like `ssh://git@bitbucket.org/OndraM/ci-detector` | -| `isPullRequest()` | `TrinaryLogic` instance | Detect whether current build is from a pull/merge request.
Returned `TrinaryLogic` object's value will be true if the current build is from a pull/merge request, false if it not, and maybe if we can't determine it (see below for what CI supports PR detection).
Use condition like `if ($ci->isPullRequest()->yes()) { /*...*/ }` to use the value. | -| `describe()` | `[...]`
(array of values) | Return key-value map of all detected properties in human-readable form. | +| Method | Example value | Description | +|-----------------------|-------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| `getCiName()` | `GitHub Actions` | Name of the CI server.
The value is one of `CiDetector::CI_*` constants. | +| `getBuildNumber()` | `33` | Get number of this concrete build.
Build number is usually human-readable increasing number sequence. It should increase each time this particular job was run on the CI server. Most CIs use simple numbering sequence like: 1, 2, 3... However, some CIs do not provide this simple human-readable value and rather use for example alphanumeric hash. | +| `getBuildUrl()` | `https://github.com/OndraM/ci-detector/commit/abcd/checks`
or empty string | Get URL where this build can be found and viewed or empty string if it cannot be determined. | +| `getCommit()` | `b9173d94(...)` | Get hash of the git (or other VCS) commit being built. | +| `getBranch()` | `my-feature`
or empty string | Get name of the git (or other VCS) branch which is being built or empty string if it cannot be determined.
Use `getTargetBranch()` to get name of the branch where this branch is targeted. | +| `getTargetBranch()` | `main`
or empty string | Get name of the target branch of a pull request or empty string if it cannot be determined.
This is the base branch to which the pull request is targeted. | +| `getRepositoryName()` | `OndraM/ci-detector`
or empty string | Get name of the git (or other VCS) repository which is being built or empty string if it cannot be determined.
This is usually in form "user/repository", for example `OndraM/ci-detector`. | +| `getRepositoryUrl()` | `https://github.com/OndraM/ci-detector`
or empty string | Get URL where the repository which is being built can be found or empty string if it cannot be determined.
This is either HTTP URL like `https://github.com/OndraM/ci-detector` but may be a git ssh url like `ssh://git@bitbucket.org/OndraM/ci-detector` | +| `isPullRequest()` | `TrinaryLogic` instance | Detect whether current build is from a pull/merge request.
Returned `TrinaryLogic` object's value will be true if the current build is from a pull/merge request, false if it not, and maybe if we can't determine it (see below for what CI supports PR detection).
Use condition like `if ($ci->isPullRequest()->yes()) { /*...*/ }` to use the value. | +| `describe()` | `[...]`
(array of values) | Return key-value map of all detected properties in human-readable form. | ## Supported properties of each CI server Most CI servers support (✔) detection of all information. However some don't expose necessary environment variables, thus reading some information may be unsupported (❌). -| CI server | Constant of `CiDetector` | `is​PullRequest` | `get​Branch` | `getTargetBranch` | `get​Repository​Name` | `get​Repository​Url` | `get​Build​Url` | -|--------------------------------------------------------|----------------------|---|---|---|---|---|---| -| [AppVeyor](https://www.appveyor.com/) | `CI_APPVEYOR` | ✔ | ✔ | ✔ | ✔ | ❌ | ✔ | -| [AWS CodeBuild](https://aws.amazon.com/codebuild/) | `CI_AWS_CODEBUILD` | ✔ | ✔ | ❌ | ❌ | ✔ | ✔ | -| [Azure Pipelines](https://azure.microsoft.com/en-us/services/devops/pipelines/) | `CI_AZURE_PIPELINES` | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| [Bamboo](https://www.atlassian.com/software/bamboo) | `CI_BAMBOO` | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| [Bitbucket Pipelines](https://bitbucket.org/product/features/pipelines)| `CI_BITBUCKET_PIPELINES` | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| [Buddy](https://buddy.works/) | `CI_BUDDY` | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| [CircleCI](https://circleci.com/) | `CI_CIRCLE` | ✔ | ✔ | ❌ | ✔ | ✔ | ✔ | -| [Codeship](https://codeship.com/) | `CI_CODESHIP` | ✔ | ✔ | ❌ | ✔ | ❌ | ✔ | -| [continuousphp](https://continuousphp.com/) | `CI_CONTINUOUSPHP` | ✔ | ✔ | ❌ | ❌ | ✔ | ✔ | -| [drone](https://drone.io/) | `CI_DRONE` | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| [GitHub Actions](https://github.com/features/actions) | `CI_GITHUB_ACTIONS` | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| [GitLab](https://about.gitlab.com/gitlab-ci/) | `CI_GITLAB` | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| [Jenkins](https://www.jenkins.io/) | `CI_JENKINS` | ❌ | ✔ | ❌ | ❌ | ✔ | ✔ | -| [SourceHut](https://sourcehut.org/) | `CI_SOURCEHUT` | ✔ | ❌ | ❌ | ❌ | ❌ | ✔ | -| [TeamCity](https://www.jetbrains.com/teamcity/) | `CI_TEAMCITY` | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | -| [Travis CI](https://travis-ci.org/) | `CI_TRAVIS` | ✔ | ✔ | ✔ | ✔ | ❌ | ✔ | -| [Wercker](https://devcenter.wercker.com/) | `CI_WERCKER` | ❌ | ✔ | ❌ | ✔ | ❌ | ✔ | +| CI server | Constant of `CiDetector` | `is​PullRequest` | `get​Branch` | `get​Target​Branch` | `get​Repository​Name` | `get​Repository​Url` | `get​Build​Url` | +|------------------------------------|--------------------------|------------------|--------------|---------------------|-----------------------|----------------------|-----------------| +| [AppVeyor][appveyor] | `CI_APPVEYOR` | ✔ | ✔ | ✔ | ✔ | ❌ | ✔ | +| [AWS CodeBuild][aws-codebuild] | `CI_AWS_CODEBUILD` | ✔ | ✔ | ❌ | ❌ | ✔ | ✔ | +| [Azure Pipelines][azure-pipelines] | `CI_AZURE_PIPELINES` | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | +| [Bamboo][bamboo] | `CI_BAMBOO` | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | +| [Bitbucket Pipelines][bitbucket] | `CI_BITBUCKET_PIPELINES` | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | +| [Buddy][buddy] | `CI_BUDDY` | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | +| [CircleCI][circleci] | `CI_CIRCLE` | ✔ | ✔ | ❌ | ✔ | ✔ | ✔ | +| [Codeship][codeship] | `CI_CODESHIP` | ✔ | ✔ | ❌ | ✔ | ❌ | ✔ | +| continuousphp | `CI_CONTINUOUSPHP` | ✔ | ✔ | ❌ | ❌ | ✔ | ✔ | +| [drone][drone] | `CI_DRONE` | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | +| [GitHub Actions][github-actions] | `CI_GITHUB_ACTIONS` | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | +| [GitLab][gitlab] | `CI_GITLAB` | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | +| [Jenkins][jenkins] | `CI_JENKINS` | ❌ | ✔ | ❌ | ❌ | ✔ | ✔ | +| [SourceHut][sourcehut] | `CI_SOURCEHUT` | ✔ | ❌ | ❌ | ❌ | ❌ | ✔ | +| [TeamCity][teamcity] | `CI_TEAMCITY` | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [Travis CI][travis-ci] | `CI_TRAVIS` | ✔ | ✔ | ✔ | ✔ | ❌ | ✔ | +| Wercker | `CI_WERCKER` | ❌ | ✔ | ❌ | ✔ | ❌ | ✔ | ## Testing @@ -167,7 +166,7 @@ see [ci-detector-standalone](https://github.com/OndraM/ci-detector-standalone) r download CI Detector as a standalone PHAR file with simple command line interface. ## Changelog -For latest changes see [CHANGELOG.md](CHANGELOG.md) file. This project follows [Semantic Versioning](http://semver.org/). +For latest changes see [CHANGELOG.md](CHANGELOG.md) file. This project follows [Semantic Versioning](https://semver.org/). ## Similar libraries for other languages @@ -177,3 +176,19 @@ Similar "CI Info" libraries exists for some other languages, for example: - JavaScript/Node.js - [watson/ci-info](https://github.com/watson/ci-info) - Python - [mgxd/ci-info](https://github.com/mgxd/ci-info) - Rust - [sagiegurari/ci_info](https://github.com/sagiegurari/ci_info) + +[appveyor]: https://www.appveyor.com/ +[aws-codebuild]: https://aws.amazon.com/codebuild/ +[azure-pipelines]: https://azure.microsoft.com/en-us/products/devops/pipelines +[bamboo]: https://www.atlassian.com/software/bamboo +[bitbucket]: https://bitbucket.org/product/features/pipelines +[buddy]: https://buddy.works/ +[circleci]: https://circleci.com/ +[codeship]: https://codeship.com/ +[drone]: https://drone.io/ +[github-actions]: https://github.com/features/actions +[gitlab]: https://about.gitlab.com/solutions/continuous-integration/ +[jenkins]: https://www.jenkins.io/ +[sourcehut]: https://sourcehut.org/ +[teamcity]: https://www.jetbrains.com/teamcity/ +[travis-ci]: https://travis-ci.org/ diff --git a/vendor/ondram/ci-detector/composer.json b/vendor/ondram/ci-detector/composer.json index 1530064cca7a..c384564e6401 100644 --- a/vendor/ondram/ci-detector/composer.json +++ b/vendor/ondram/ci-detector/composer.json @@ -1,7 +1,8 @@ { "name": "ondram\/ci-detector", - "type": "library", "description": "Detect continuous integration environment and provide unified access to properties of current build", + "license": "MIT", + "type": "library", "keywords": [ "continuous integration", "ci-info", @@ -31,7 +32,6 @@ "travis", "wercker" ], - "license": "MIT", "authors": [ { "name": "Ond\u0159ej Machulda", @@ -39,19 +39,16 @@ } ], "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" - }, - "config": { - "sort-packages": true + "phpstan\/extension-installer": "^1.1.0", + "phpstan\/phpstan": "^1.2.0", + "phpstan\/phpstan-phpunit": "^1.0.0", + "phpunit\/phpunit": "^9.6.13" }, "autoload": { "psr-4": { @@ -63,6 +60,14 @@ "RectorPrefix202403\\OndraM\\CiDetector\\Ci\\": "tests\/" } }, + "config": { + "allow-plugins": { + "dealerdirect\/phpcodesniffer-composer-installer": true, + "ergebnis\/composer-normalize": true, + "phpstan\/extension-installer": true + }, + "sort-packages": true + }, "scripts": { "all": [ "@lint", @@ -70,15 +75,15 @@ "@test" ], "analyze": [ - "vendor\/bin\/ecs check .\/src\/ .\/tests\/ --ansi", + "vendor\/bin\/ecs check .\/src\/ .\/tests\/ ecs.php --ansi", "vendor\/bin\/phpstan analyze -c phpstan.neon --ansi" ], "fix": [ "@composer normalize", - "vendor\/bin\/ecs check .\/src\/ .\/tests\/ --ansi --fix" + "vendor\/bin\/ecs check .\/src\/ .\/tests\/ ecs.php --ansi --fix" ], "lint": [ - "vendor\/bin\/parallel-lint -j 10 -e php .\/src .\/tests dump-current.php", + "vendor\/bin\/parallel-lint -j 10 -e php .\/src .\/tests ecs.php dump-current.php", "@composer validate", "@composer normalize --dry-run" ], diff --git a/vendor/ondram/ci-detector/ecs.php b/vendor/ondram/ci-detector/ecs.php new file mode 100644 index 000000000000..03f4d0e0298b --- /dev/null +++ b/vendor/ondram/ci-detector/ecs.php @@ -0,0 +1,24 @@ +parameters(); + $parameters->set(Option::SKIP, [__DIR__ . '/tests/PropertiesPrinterHelper.php']); + $containerConfigurator->import(__DIR__ . '/vendor/lmc/coding-standard/ecs.php'); + $services = $containerConfigurator->services(); + // Use single-line phpdoc where possible + $services->set(PhpdocLineSpanFixer::class)->call('configure', [['property' => 'single']]); + // Tests must have @test annotation + $services->set(PhpUnitTestAnnotationFixer::class)->call('configure', [['style' => 'annotation']]); + $services->set(OrderedClassElementsFixer::class); + // Force line length + $services->set(LineLengthFixer::class)->call('configure', [['line_length' => 120, 'break_long_lines' => \true, 'inline_short_lines' => \false]]); +}; diff --git a/vendor/ondram/ci-detector/src/Ci/AbstractCi.php b/vendor/ondram/ci-detector/src/Ci/AbstractCi.php index e91637413b2b..37547d62e033 100644 --- a/vendor/ondram/ci-detector/src/Ci/AbstractCi.php +++ b/vendor/ondram/ci-detector/src/Ci/AbstractCi.php @@ -9,7 +9,9 @@ */ abstract class AbstractCi implements CiInterface { - /** @var Env */ + /** + * @var \OndraM\CiDetector\Env + */ protected $env; public function __construct(Env $env) { diff --git a/vendor/ondram/ci-detector/src/Ci/Wercker.php b/vendor/ondram/ci-detector/src/Ci/Wercker.php index c43612a13696..3a22fb1994a3 100644 --- a/vendor/ondram/ci-detector/src/Ci/Wercker.php +++ b/vendor/ondram/ci-detector/src/Ci/Wercker.php @@ -6,6 +6,9 @@ use RectorPrefix202403\OndraM\CiDetector\CiDetector; use RectorPrefix202403\OndraM\CiDetector\Env; use RectorPrefix202403\OndraM\CiDetector\TrinaryLogic; +/** + * @deprecated Will be removed in next major version + */ class Wercker extends AbstractCi { public static function isDetected(Env $env) : bool diff --git a/vendor/ondram/ci-detector/src/CiDetector.php b/vendor/ondram/ci-detector/src/CiDetector.php index ba697109b7e8..1e2365a8c654 100644 --- a/vendor/ondram/ci-detector/src/CiDetector.php +++ b/vendor/ondram/ci-detector/src/CiDetector.php @@ -26,8 +26,13 @@ class CiDetector implements CiDetectorInterface public const CI_SOURCEHUT = 'SourceHut'; public const CI_TEAMCITY = 'TeamCity'; public const CI_TRAVIS = 'Travis CI'; + /** + * @deprecated Will be removed in next major version + */ public const CI_WERCKER = 'Wercker'; - /** @var Env */ + /** + * @var \OndraM\CiDetector\Env + */ private $environment; public final function __construct() { @@ -64,10 +69,8 @@ protected function detectCurrentCiServer() : ?CiInterface $ciServers = $this->getCiServers(); foreach ($ciServers as $ciClass) { $callback = [$ciClass, 'isDetected']; - if (\is_callable($callback)) { - if ($callback($this->environment)) { - return new $ciClass($this->environment); - } + if (\is_callable($callback) && $callback($this->environment)) { + return new $ciClass($this->environment); } } return null; diff --git a/vendor/ondram/ci-detector/src/TrinaryLogic.php b/vendor/ondram/ci-detector/src/TrinaryLogic.php index 60b82f64991a..a3ca92dd7ef0 100644 --- a/vendor/ondram/ci-detector/src/TrinaryLogic.php +++ b/vendor/ondram/ci-detector/src/TrinaryLogic.php @@ -16,7 +16,9 @@ final class TrinaryLogic private const NO = -1; /** @var self[] */ private static $registry = []; - /** @var int */ + /** + * @var int + */ private $value; private function __construct(int $value) { @@ -30,26 +32,22 @@ public static function createFromBoolean(bool $value) : self { return self::create($value ? self::YES : self::NO); } - private static function create(int $value) : self - { - return self::$registry[$value] = self::$registry[$value] ?? new self($value); - } /** - * Return true if its known for sure that the value is true + * Return true if it's known for sure that the value is true */ public function yes() : bool { return $this->value === self::YES; } /** - * Return true if its not known for sure whether the value is true or false + * Return true if it's not known for sure whether the value is true or false */ public function maybe() : bool { return $this->value === self::MAYBE; } /** - * Return true if its known for sure that the value is false + * Return true if it's known for sure that the value is false */ public function no() : bool { @@ -57,11 +55,16 @@ public function no() : bool } /** * Return string representation of the value. - * "Yes" when the value is true, "No" when its false, "Maybe" when its not known for sure whether its true or false. + * "Yes" when the value is true, "No" when its false, "Maybe" when it's not known for sure whether its + * true or false. */ public function describe() : string { static $labels = [self::NO => 'No', self::MAYBE => 'Maybe', self::YES => 'Yes']; return $labels[$this->value]; } + private static function create(int $value) : self + { + return self::$registry[$value] = self::$registry[$value] ?? new self($value); + } } diff --git a/vendor/rector/extension-installer/src/GeneratedConfig.php b/vendor/rector/extension-installer/src/GeneratedConfig.php index 3771ec583c6c..c33fc46b9652 100644 --- a/vendor/rector/extension-installer/src/GeneratedConfig.php +++ b/vendor/rector/extension-installer/src/GeneratedConfig.php @@ -9,7 +9,7 @@ */ 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 a1d50bb'), '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 9a6a85b'), '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 6845db4'), '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 5ce789d')); + 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 a1d50bb'), '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 9a6a85b'), '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 6845db4'), '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 c8b6413')); private function __construct() { } diff --git a/vendor/rector/rector-symfony/README.md b/vendor/rector/rector-symfony/README.md index 1137692184db..400e9cce4feb 100644 --- a/vendor/rector/rector-symfony/README.md +++ b/vendor/rector/rector-symfony/README.md @@ -44,7 +44,7 @@ How to add it? Check your `var/cache/` directory and find the XML file for your use Rector\Config\RectorConfig; return RectorConfig::configure() - ->withSymfonyContainerXml((__DIR__ . '/var/cache/dev/App_KernelDevDebugContainer.xml'); + ->withSymfonyContainerXml(__DIR__ . '/var/cache/dev/App_KernelDevDebugContainer.xml'); ``` That's it! Now you can run the `StringFormTypeToClassRector` and get your form classes converted safely.