From b995ac6061286b76f2930b8855acb32fe2231edf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20Sz=C3=A9pe?= Date: Tue, 3 Nov 2020 20:37:11 +0100 Subject: [PATCH 1/8] Add debugger function Fixes https://github.com/phpstan/phpstan/issues/3765 --- src/Debugger.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/Debugger.php diff --git a/src/Debugger.php b/src/Debugger.php new file mode 100644 index 0000000000..de6ce44077 --- /dev/null +++ b/src/Debugger.php @@ -0,0 +1,14 @@ + Date: Tue, 3 Nov 2020 20:45:53 +0100 Subject: [PATCH 2/8] Update Debugger.php --- src/Debugger.php | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/Debugger.php b/src/Debugger.php index de6ce44077..aff931b0df 100644 --- a/src/Debugger.php +++ b/src/Debugger.php @@ -4,11 +4,10 @@ class Debugger { - /** - * @var mixed $thing - */ - public function logType($thing) - { - // - } + /** + * @var mixed $thing + */ + public function dumpType($thing): void + { + } } From 9b5a09d2d4b11c8c1055b77c69d1cb2089a96b11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20Sz=C3=A9pe?= Date: Tue, 3 Nov 2020 20:02:30 +0000 Subject: [PATCH 3/8] Add debugger function --- composer.json | 5 +- composer.lock | 443 +------------------ src/Debugger.php | 13 - src/Rules/Functions/DebuggerFunctionRule.php | 30 ++ src/debugger.php | 10 + 5 files changed, 46 insertions(+), 455 deletions(-) delete mode 100644 src/Debugger.php create mode 100644 src/Rules/Functions/DebuggerFunctionRule.php create mode 100644 src/debugger.php diff --git a/composer.json b/composer.json index 5fc20ec132..55dcf656d8 100644 --- a/composer.json +++ b/composer.json @@ -69,7 +69,10 @@ "PHPStan\\": [ "src/" ] - } + }, + "files": [ + "src/debugger.php" + ] }, "autoload-dev": { "psr-4": { diff --git a/composer.lock b/composer.lock index b96c7d581a..28af1fa948 100644 --- a/composer.lock +++ b/composer.lock @@ -58,10 +58,6 @@ "sleep", "synchronous" ], - "support": { - "issues": "https://github.com/clue/reactphp-block/issues", - "source": "https://github.com/clue/reactphp-block/tree/v1.4.0" - }, "funding": [ { "url": "https://clue.engineering/support", @@ -122,10 +118,6 @@ "reactphp", "streaming" ], - "support": { - "issues": "https://github.com/clue/reactphp-ndjson/issues", - "source": "https://github.com/clue/reactphp-ndjson/tree/v1.1.0" - }, "time": "2020-02-04T11:48:52+00:00" }, { @@ -182,11 +174,6 @@ "ssl", "tls" ], - "support": { - "irc": "irc://irc.freenode.org/composer", - "issues": "https://github.com/composer/ca-bundle/issues", - "source": "https://github.com/composer/ca-bundle/tree/1.2.8" - }, "funding": [ { "url": "https://packagist.com", @@ -256,10 +243,6 @@ } ], "description": "Composer plugin that provides efficient querying for installed package versions (no runtime IO)", - "support": { - "issues": "https://github.com/composer/package-versions-deprecated/issues", - "source": "https://github.com/composer/package-versions-deprecated/tree/master" - }, "funding": [ { "url": "https://packagist.com", @@ -318,11 +301,6 @@ "Xdebug", "performance" ], - "support": { - "irc": "irc://irc.freenode.org/composer", - "issues": "https://github.com/composer/xdebug-handler/issues", - "source": "https://github.com/composer/xdebug-handler/tree/1.4.3" - }, "funding": [ { "url": "https://packagist.com", @@ -380,10 +358,6 @@ "event-dispatcher", "event-emitter" ], - "support": { - "issues": "https://github.com/igorw/evenement/issues", - "source": "https://github.com/igorw/evenement/tree/master" - }, "time": "2017-07-23T21:35:13+00:00" }, { @@ -466,14 +440,6 @@ "trace", "uniform" ], - "support": { - "docs": "https://central.hoa-project.net/Documentation/Library/Compiler", - "email": "support@hoa-project.net", - "forum": "https://users.hoa-project.net/", - "irc": "irc://chat.freenode.net/hoaproject", - "issues": "https://github.com/hoaproject/Compiler/issues", - "source": "https://central.hoa-project.net/Resource/Library/Compiler" - }, "time": "2017-08-08T07:44:07+00:00" }, { @@ -537,14 +503,6 @@ "keyword", "library" ], - "support": { - "docs": "https://central.hoa-project.net/Documentation/Library/Consistency", - "email": "support@hoa-project.net", - "forum": "https://users.hoa-project.net/", - "irc": "irc://chat.freenode.net/hoaproject", - "issues": "https://github.com/hoaproject/Consistency/issues", - "source": "https://central.hoa-project.net/Resource/Library/Consistency" - }, "time": "2017-05-02T12:18:12+00:00" }, { @@ -601,14 +559,6 @@ "listener", "observer" ], - "support": { - "docs": "https://central.hoa-project.net/Documentation/Library/Event", - "email": "support@hoa-project.net", - "forum": "https://users.hoa-project.net/", - "irc": "irc://chat.freenode.net/hoaproject", - "issues": "https://github.com/hoaproject/Event/issues", - "source": "https://central.hoa-project.net/Resource/Library/Event" - }, "time": "2017-01-13T15:30:50+00:00" }, { @@ -663,14 +613,6 @@ "exception", "library" ], - "support": { - "docs": "https://central.hoa-project.net/Documentation/Library/Exception", - "email": "support@hoa-project.net", - "forum": "https://users.hoa-project.net/", - "irc": "irc://chat.freenode.net/hoaproject", - "issues": "https://github.com/hoaproject/Exception/issues", - "source": "https://central.hoa-project.net/Resource/Library/Exception" - }, "time": "2017-01-16T07:53:27+00:00" }, { @@ -733,14 +675,6 @@ "link", "temporary" ], - "support": { - "docs": "https://central.hoa-project.net/Documentation/Library/File", - "email": "support@hoa-project.net", - "forum": "https://users.hoa-project.net/", - "irc": "irc://chat.freenode.net/hoaproject", - "issues": "https://github.com/hoaproject/File/issues", - "source": "https://central.hoa-project.net/Resource/Library/File" - }, "time": "2017-07-11T07:42:15+00:00" }, { @@ -795,14 +729,6 @@ "iterator", "library" ], - "support": { - "docs": "https://central.hoa-project.net/Documentation/Library/Iterator", - "email": "support@hoa-project.net", - "forum": "https://users.hoa-project.net/", - "irc": "irc://chat.freenode.net/hoaproject", - "issues": "https://github.com/hoaproject/Iterator/issues", - "source": "https://central.hoa-project.net/Resource/Library/Iterator" - }, "time": "2017-01-10T10:34:47+00:00" }, { @@ -868,14 +794,6 @@ "sampler", "set" ], - "support": { - "docs": "https://central.hoa-project.net/Documentation/Library/Math", - "email": "support@hoa-project.net", - "forum": "https://users.hoa-project.net/", - "irc": "irc://chat.freenode.net/hoaproject", - "issues": "https://github.com/hoaproject/Math/issues", - "source": "https://central.hoa-project.net/Resource/Library/Math" - }, "time": "2017-05-16T08:02:17+00:00" }, { @@ -936,14 +854,6 @@ "stream", "wrapper" ], - "support": { - "docs": "https://central.hoa-project.net/Documentation/Library/Protocol", - "email": "support@hoa-project.net", - "forum": "https://users.hoa-project.net/", - "irc": "irc://chat.freenode.net/hoaproject", - "issues": "https://github.com/hoaproject/Protocol/issues", - "source": "https://central.hoa-project.net/Resource/Library/Protocol" - }, "time": "2017-01-14T12:26:10+00:00" }, { @@ -1000,14 +910,6 @@ "library", "regex" ], - "support": { - "docs": "https://central.hoa-project.net/Documentation/Library/Regex", - "email": "support@hoa-project.net", - "forum": "https://users.hoa-project.net/", - "irc": "irc://chat.freenode.net/hoaproject", - "issues": "https://github.com/hoaproject/Regex/issues", - "source": "https://central.hoa-project.net/Resource/Library/Regex" - }, "time": "2017-01-13T16:10:24+00:00" }, { @@ -1072,14 +974,6 @@ "stream", "wrapper" ], - "support": { - "docs": "https://central.hoa-project.net/Documentation/Library/Stream", - "email": "support@hoa-project.net", - "forum": "https://users.hoa-project.net/", - "irc": "irc://chat.freenode.net/hoaproject", - "issues": "https://github.com/hoaproject/Stream/issues", - "source": "https://central.hoa-project.net/Resource/Library/Stream" - }, "time": "2017-02-21T16:01:06+00:00" }, { @@ -1140,14 +1034,6 @@ "string", "unicode" ], - "support": { - "docs": "https://central.hoa-project.net/Documentation/Library/Ustring", - "email": "support@hoa-project.net", - "forum": "https://users.hoa-project.net/", - "irc": "irc://chat.freenode.net/hoaproject", - "issues": "https://github.com/hoaproject/Ustring/issues", - "source": "https://central.hoa-project.net/Resource/Library/Ustring" - }, "time": "2017-01-16T07:08:25+00:00" }, { @@ -1203,14 +1089,6 @@ "visit", "visitor" ], - "support": { - "docs": "https://central.hoa-project.net/Documentation/Library/Visitor", - "email": "support@hoa-project.net", - "forum": "https://users.hoa-project.net/", - "irc": "irc://chat.freenode.net/hoaproject", - "issues": "https://github.com/hoaproject/Visitor/issues", - "source": "https://central.hoa-project.net/Resource/Library/Visitor" - }, "time": "2017-01-16T07:02:03+00:00" }, { @@ -1263,14 +1141,6 @@ "parameter", "zformat" ], - "support": { - "docs": "https://central.hoa-project.net/Documentation/Library/Zformat", - "email": "support@hoa-project.net", - "forum": "https://users.hoa-project.net/", - "irc": "irc://chat.freenode.net/hoaproject", - "issues": "https://github.com/hoaproject/Zformat/issues", - "source": "https://central.hoa-project.net/Resource/Library/Zformat" - }, "time": "2017-01-10T10:39:54+00:00" }, { @@ -1322,10 +1192,6 @@ "release", "versions" ], - "support": { - "issues": "https://github.com/Jean85/pretty-package-versions/issues", - "source": "https://github.com/Jean85/pretty-package-versions/tree/1.5.1" - }, "time": "2020-09-14T08:43:34+00:00" }, { @@ -1349,7 +1215,6 @@ "phpdocumentor/reflection-docblock": "dev-master", "phpunit/phpunit": "^9" }, - "default-branch": true, "type": "library", "autoload": { "files": [ @@ -1372,10 +1237,7 @@ "stubs", "type" ], - "support": { - "source": "https://github.com/JetBrains/phpstorm-stubs/tree/master" - }, - "time": "2020-09-14T12:37:46+00:00" + "time": "2020-11-02T13:30:35+00:00" }, { "name": "nette/bootstrap", @@ -1452,10 +1314,6 @@ "configurator", "nette" ], - "support": { - "issues": "https://github.com/nette/bootstrap/issues", - "source": "https://github.com/nette/bootstrap/tree/master" - }, "time": "2020-05-26T08:46:23+00:00" }, { @@ -1527,10 +1385,6 @@ "nette", "static" ], - "support": { - "issues": "https://github.com/nette/di/issues", - "source": "https://github.com/nette/di/tree/master" - }, "time": "2020-08-13T13:04:23+00:00" }, { @@ -1594,10 +1448,6 @@ "iterator", "nette" ], - "support": { - "issues": "https://github.com/nette/finder/issues", - "source": "https://github.com/nette/finder/tree/v2.5.2" - }, "time": "2020-01-03T20:35:40+00:00" }, { @@ -1660,10 +1510,6 @@ "nette", "yaml" ], - "support": { - "issues": "https://github.com/nette/neon/issues", - "source": "https://github.com/nette/neon/tree/master" - }, "time": "2020-07-31T12:28:05+00:00" }, { @@ -1728,10 +1574,6 @@ "php", "scaffolding" ], - "support": { - "issues": "https://github.com/nette/php-generator/issues", - "source": "https://github.com/nette/php-generator/tree/master" - }, "time": "2020-06-19T14:31:47+00:00" }, { @@ -1795,10 +1637,6 @@ "nette", "trait" ], - "support": { - "issues": "https://github.com/nette/robot-loader/issues", - "source": "https://github.com/nette/robot-loader/tree/v3.3.1" - }, "time": "2020-09-15T15:14:17+00:00" }, { @@ -1855,10 +1693,6 @@ "config", "nette" ], - "support": { - "issues": "https://github.com/nette/schema/issues", - "source": "https://github.com/nette/schema/tree/v1.0.2" - }, "time": "2020-01-06T22:52:48+00:00" }, { @@ -1937,10 +1771,6 @@ "utility", "validation" ], - "support": { - "issues": "https://github.com/nette/utils/issues", - "source": "https://github.com/nette/utils/tree/v3.1.3" - }, "time": "2020-08-07T10:34:21+00:00" }, { @@ -1993,10 +1823,6 @@ "parser", "php" ], - "support": { - "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.10.2" - }, "time": "2020-09-26T10:30:38+00:00" }, { @@ -2065,10 +1891,6 @@ "teamcity", "travis" ], - "support": { - "issues": "https://github.com/OndraM/ci-detector/issues", - "source": "https://github.com/OndraM/ci-detector/tree/main" - }, "time": "2020-09-04T11:21:14+00:00" }, { @@ -2140,9 +1962,6 @@ } ], "description": "Better Reflection - an improved code reflection API", - "support": { - "source": "https://github.com/ondrejmirtes/BetterReflection/tree/4.3.42" - }, "time": "2020-11-03T08:10:09+00:00" }, { @@ -2192,10 +2011,6 @@ "reflection", "static analysis" ], - "support": { - "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", - "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" - }, "time": "2020-06-27T09:03:43+00:00" }, { @@ -2248,10 +2063,6 @@ } ], "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "support": { - "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", - "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/release/4.x" - }, "time": "2019-12-28T18:55:12+00:00" }, { @@ -2297,10 +2108,6 @@ } ], "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", - "support": { - "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.4.0" - }, "time": "2020-09-17T18:55:26+00:00" }, { @@ -2329,10 +2136,6 @@ "PHP-3.01" ], "description": "PHP stubs extracted from php-src", - "support": { - "issues": "https://github.com/phpstan/php-8-stubs/issues", - "source": "https://github.com/phpstan/php-8-stubs/tree/0.1.6" - }, "time": "2020-10-18T00:43:02+00:00" }, { @@ -2382,10 +2185,6 @@ "MIT" ], "description": "PHPDoc parser with support for nullable, intersection and generic types", - "support": { - "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/master" - }, "time": "2020-08-03T20:32:43+00:00" }, { @@ -2435,10 +2234,6 @@ "container-interop", "psr" ], - "support": { - "issues": "https://github.com/php-fig/container/issues", - "source": "https://github.com/php-fig/container/tree/master" - }, "time": "2017-02-14T16:28:37+00:00" }, { @@ -2489,9 +2284,6 @@ "request", "response" ], - "support": { - "source": "https://github.com/php-fig/http-message/tree/master" - }, "time": "2016-08-06T14:39:51+00:00" }, { @@ -2539,9 +2331,6 @@ "psr", "psr-3" ], - "support": { - "source": "https://github.com/php-fig/log/tree/1.1.3" - }, "time": "2020-03-23T09:12:05+00:00" }, { @@ -2604,10 +2393,6 @@ "promise", "reactphp" ], - "support": { - "issues": "https://github.com/reactphp/cache/issues", - "source": "https://github.com/reactphp/cache/tree/v1.1.0" - }, "funding": [ { "url": "https://github.com/WyriHaximus", @@ -2661,10 +2446,6 @@ "process", "reactphp" ], - "support": { - "issues": "https://github.com/reactphp/child-process/issues", - "source": "https://github.com/reactphp/child-process/tree/v0.6.1" - }, "time": "2019-02-15T13:48:16+00:00" }, { @@ -2731,10 +2512,6 @@ "dns-resolver", "reactphp" ], - "support": { - "issues": "https://github.com/reactphp/dns/issues", - "source": "https://github.com/reactphp/dns/tree/v1.4.0" - }, "funding": [ { "url": "https://github.com/WyriHaximus", @@ -2787,10 +2564,6 @@ "asynchronous", "event-loop" ], - "support": { - "issues": "https://github.com/reactphp/event-loop/issues", - "source": "https://github.com/reactphp/event-loop/tree/v1.1.1" - }, "time": "2020-01-01T18:39:52+00:00" }, { @@ -2871,10 +2644,6 @@ "server", "streaming" ], - "support": { - "issues": "https://github.com/reactphp/http/issues", - "source": "https://github.com/reactphp/http/tree/v1.1.0" - }, "funding": [ { "url": "https://github.com/WyriHaximus", @@ -2931,10 +2700,6 @@ "promise", "promises" ], - "support": { - "issues": "https://github.com/reactphp/promise/issues", - "source": "https://github.com/reactphp/promise/tree/v2.8.0" - }, "time": "2020-05-12T15:16:56+00:00" }, { @@ -2991,10 +2756,6 @@ "stream", "unwrap" ], - "support": { - "issues": "https://github.com/reactphp/promise-stream/issues", - "source": "https://github.com/reactphp/promise-stream/tree/v1.2.0" - }, "time": "2019-07-03T12:29:10+00:00" }, { @@ -3048,10 +2809,6 @@ "timeout", "timer" ], - "support": { - "issues": "https://github.com/reactphp/promise-timer/issues", - "source": "https://github.com/reactphp/promise-timer/tree/v1.6.0" - }, "time": "2020-07-10T12:18:06+00:00" }, { @@ -3122,10 +2879,6 @@ "reactphp", "stream" ], - "support": { - "issues": "https://github.com/reactphp/socket/issues", - "source": "https://github.com/reactphp/socket/tree/v1.6.0" - }, "funding": [ { "url": "https://github.com/WyriHaximus", @@ -3182,10 +2935,6 @@ "stream", "writable" ], - "support": { - "issues": "https://github.com/reactphp/stream/issues", - "source": "https://github.com/reactphp/stream/tree/v1.1.1" - }, "time": "2020-05-04T10:17:57+00:00" }, { @@ -3244,9 +2993,6 @@ "stream", "uri" ], - "support": { - "source": "https://github.com/ringcentral/psr7/tree/master" - }, "time": "2018-05-29T20:21:04+00:00" }, { @@ -3282,10 +3028,6 @@ "MIT" ], "description": "Sign and verify stuff", - "support": { - "issues": "https://github.com/Roave/Signature/issues", - "source": "https://github.com/Roave/Signature/tree/1.1.0" - }, "time": "2020-10-01T07:27:11+00:00" }, { @@ -3363,9 +3105,6 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/console/tree/v4.4.15" - }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -3429,9 +3168,6 @@ ], "description": "Symfony Finder Component", "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/finder/tree/v4.4.15" - }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -3508,9 +3244,6 @@ "polyfill", "portable" ], - "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.19.0" - }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -3588,9 +3321,6 @@ "portable", "shim" ], - "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.19.0" - }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -3667,9 +3397,6 @@ "portable", "shim" ], - "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.19.0" - }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -3750,9 +3477,6 @@ "portable", "shim" ], - "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.19.0" - }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -3825,9 +3549,6 @@ "interoperability", "standards" ], - "support": { - "source": "https://github.com/symfony/service-contracts/tree/v1.1.8" - }, "time": "2019-10-14T12:27:06+00:00" }, { @@ -3877,10 +3598,6 @@ "check", "validate" ], - "support": { - "issues": "https://github.com/webmozart/assert/issues", - "source": "https://github.com/webmozart/assert/tree/master" - }, "time": "2020-07-08T17:02:28+00:00" } ], @@ -3924,10 +3641,6 @@ } ], "description": "A dependable php environment", - "support": { - "issues": "https://github.com/brianium/habitat/issues", - "source": "https://github.com/brianium/habitat/tree/v1.0.0" - }, "time": "2013-06-08T04:42:29+00:00" }, { @@ -3992,10 +3705,6 @@ "phpunit", "testing" ], - "support": { - "issues": "https://github.com/paratestphp/paratest/issues", - "source": "https://github.com/paratestphp/paratest/tree/master" - }, "time": "2020-02-07T22:07:07+00:00" }, { @@ -4057,11 +3766,6 @@ "validation", "versioning" ], - "support": { - "irc": "irc://irc.freenode.org/composer", - "issues": "https://github.com/composer/semver/issues", - "source": "https://github.com/composer/semver/tree/1.7.1" - }, "funding": [ { "url": "https://packagist.com", @@ -4132,10 +3836,6 @@ "constructor", "instantiate" ], - "support": { - "issues": "https://github.com/doctrine/instantiator/issues", - "source": "https://github.com/doctrine/instantiator/tree/1.3.x" - }, "funding": [ { "url": "https://www.doctrine-project.org/sponsorship.html", @@ -4219,10 +3919,6 @@ "normalizer", "plugin" ], - "support": { - "issues": "https://github.com/ergebnis/composer-normalize/issues", - "source": "https://github.com/ergebnis/composer-normalize" - }, "funding": [ { "url": "https://github.com/localheinz", @@ -4289,10 +3985,6 @@ "json", "normalizer" ], - "support": { - "issues": "https://github.com/ergebnis/json-normalizer/issues", - "source": "https://github.com/ergebnis/json-normalizer" - }, "funding": [ { "url": "https://github.com/localheinz", @@ -4358,10 +4050,6 @@ "json", "printer" ], - "support": { - "issues": "https://github.com/ergebnis/json-printer/issues", - "source": "https://github.com/ergebnis/json-printer" - }, "funding": [ { "url": "https://github.com/localheinz", @@ -4434,10 +4122,6 @@ "json", "schema" ], - "support": { - "issues": "https://github.com/justinrainbow/json-schema/issues", - "source": "https://github.com/justinrainbow/json-schema/tree/5.2.10" - }, "time": "2020-05-27T16:41:55+00:00" }, { @@ -4489,9 +4173,6 @@ "unidiff", "unified diff" ], - "support": { - "source": "https://github.com/localheinz/diff/tree/main" - }, "funding": [ { "url": "https://github.com/sebastianbergmann", @@ -4546,10 +4227,6 @@ "object", "object graph" ], - "support": { - "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.x" - }, "funding": [ { "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", @@ -4606,10 +4283,6 @@ "rest", "restful" ], - "support": { - "issues": "https://github.com/nategood/httpful/issues", - "source": "https://github.com/nategood/httpful/tree/v0.2.20" - }, "time": "2015-10-26T16:11:30+00:00" }, { @@ -4665,10 +4338,6 @@ } ], "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", - "support": { - "issues": "https://github.com/phar-io/manifest/issues", - "source": "https://github.com/phar-io/manifest/tree/master" - }, "time": "2018-07-08T19:23:20+00:00" }, { @@ -4716,10 +4385,6 @@ } ], "description": "Library for handling version information and constraints", - "support": { - "issues": "https://github.com/phar-io/version/issues", - "source": "https://github.com/phar-io/version/tree/master" - }, "time": "2018-07-08T19:19:57+00:00" }, { @@ -4813,11 +4478,6 @@ "task", "tool" ], - "support": { - "irc": "irc://irc.freenode.net/phing", - "issues": "https://www.phing.info/trac/report", - "source": "https://github.com/phingofficial/phing/tree/oldstable" - }, "time": "2020-02-03T18:50:54+00:00" }, { @@ -4871,10 +4531,6 @@ ], "description": "This tool check syntax of PHP files about 20x faster than serial check.", "homepage": "https://github.com/php-parallel-lint/PHP-Parallel-Lint", - "support": { - "issues": "https://github.com/php-parallel-lint/PHP-Parallel-Lint/issues", - "source": "https://github.com/php-parallel-lint/PHP-Parallel-Lint/tree/master" - }, "time": "2020-04-04T12:18:32+00:00" }, { @@ -4938,10 +4594,6 @@ "spy", "stub" ], - "support": { - "issues": "https://github.com/phpspec/prophecy/issues", - "source": "https://github.com/phpspec/prophecy/tree/v1.10.3" - }, "time": "2020-03-05T15:02:03+00:00" }, { @@ -4993,10 +4645,6 @@ "MIT" ], "description": "PHPStan rules for detecting usage of deprecated classes, methods, properties, constants and traits.", - "support": { - "issues": "https://github.com/phpstan/phpstan-deprecation-rules/issues", - "source": "https://github.com/phpstan/phpstan-deprecation-rules/tree/0.12.5" - }, "time": "2020-07-21T14:52:30+00:00" }, { @@ -5049,10 +4697,6 @@ "MIT" ], "description": "PHP-Parser extensions for PHPStan", - "support": { - "issues": "https://github.com/phpstan/phpstan-php-parser/issues", - "source": "https://github.com/phpstan/phpstan-php-parser/tree/0.12.2" - }, "time": "2020-07-21T14:50:29+00:00" }, { @@ -5109,10 +4753,6 @@ "MIT" ], "description": "PHPUnit extensions and rules for PHPStan", - "support": { - "issues": "https://github.com/phpstan/phpstan-phpunit/issues", - "source": "https://github.com/phpstan/phpstan-phpunit/tree/0.12.16" - }, "time": "2020-08-05T13:28:50+00:00" }, { @@ -5164,10 +4804,6 @@ "MIT" ], "description": "Extra strict and opinionated rules for PHPStan", - "support": { - "issues": "https://github.com/phpstan/phpstan-strict-rules/issues", - "source": "https://github.com/phpstan/phpstan-strict-rules/tree/master" - }, "time": "2020-08-30T15:42:06+00:00" }, { @@ -5231,10 +4867,6 @@ "testing", "xunit" ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/master" - }, "time": "2018-10-31T16:06:48+00:00" }, { @@ -5285,10 +4917,6 @@ "filesystem", "iterator" ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", - "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/2.0.2" - }, "time": "2018-09-13T20:33:42+00:00" }, { @@ -5330,10 +4958,6 @@ "keywords": [ "template" ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-text-template/issues", - "source": "https://github.com/sebastianbergmann/php-text-template/tree/1.2.1" - }, "time": "2015-06-21T13:50:34+00:00" }, { @@ -5383,10 +5007,6 @@ "keywords": [ "timer" ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-timer/issues", - "source": "https://github.com/sebastianbergmann/php-timer/tree/master" - }, "time": "2019-06-07T04:22:29+00:00" }, { @@ -5436,10 +5056,6 @@ "keywords": [ "tokenizer" ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-token-stream/issues", - "source": "https://github.com/sebastianbergmann/php-token-stream/tree/3.1.1" - }, "abandoned": true, "time": "2019-09-17T06:23:10+00:00" }, @@ -5525,10 +5141,6 @@ "testing", "xunit" ], - "support": { - "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/7.5.20" - }, "time": "2020-01-08T08:45:45+00:00" }, { @@ -5574,10 +5186,6 @@ ], "description": "Looks up which function or method a line of code belongs to", "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", - "support": { - "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", - "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/master" - }, "time": "2017-03-04T06:30:41+00:00" }, { @@ -5642,10 +5250,6 @@ "compare", "equality" ], - "support": { - "issues": "https://github.com/sebastianbergmann/comparator/issues", - "source": "https://github.com/sebastianbergmann/comparator/tree/master" - }, "time": "2018-07-12T15:12:46+00:00" }, { @@ -5702,10 +5306,6 @@ "unidiff", "unified diff" ], - "support": { - "issues": "https://github.com/sebastianbergmann/diff/issues", - "source": "https://github.com/sebastianbergmann/diff/tree/master" - }, "time": "2019-02-04T06:01:07+00:00" }, { @@ -5759,10 +5359,6 @@ "environment", "hhvm" ], - "support": { - "issues": "https://github.com/sebastianbergmann/environment/issues", - "source": "https://github.com/sebastianbergmann/environment/tree/4.2.3" - }, "time": "2019-11-20T08:46:58+00:00" }, { @@ -5830,10 +5426,6 @@ "export", "exporter" ], - "support": { - "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/master" - }, "time": "2019-09-14T09:02:43+00:00" }, { @@ -5885,10 +5477,6 @@ "keywords": [ "global state" ], - "support": { - "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/2.0.0" - }, "time": "2017-04-27T15:39:26+00:00" }, { @@ -5936,10 +5524,6 @@ ], "description": "Traverses array structures and object graphs to enumerate all referenced objects", "homepage": "https://github.com/sebastianbergmann/object-enumerator/", - "support": { - "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", - "source": "https://github.com/sebastianbergmann/object-enumerator/tree/master" - }, "time": "2017-08-03T12:35:26+00:00" }, { @@ -5985,10 +5569,6 @@ ], "description": "Allows reflection of object attributes, including inherited and non-public ones", "homepage": "https://github.com/sebastianbergmann/object-reflector/", - "support": { - "issues": "https://github.com/sebastianbergmann/object-reflector/issues", - "source": "https://github.com/sebastianbergmann/object-reflector/tree/master" - }, "time": "2017-03-29T09:07:27+00:00" }, { @@ -6042,10 +5622,6 @@ ], "description": "Provides functionality to recursively process PHP variables", "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "support": { - "issues": "https://github.com/sebastianbergmann/recursion-context/issues", - "source": "https://github.com/sebastianbergmann/recursion-context/tree/master" - }, "time": "2017-03-03T06:23:57+00:00" }, { @@ -6088,10 +5664,6 @@ ], "description": "Provides a list of PHP built-in functions that operate on resources", "homepage": "https://www.github.com/sebastianbergmann/resource-operations", - "support": { - "issues": "https://github.com/sebastianbergmann/resource-operations/issues", - "source": "https://github.com/sebastianbergmann/resource-operations/tree/master" - }, "time": "2018-10-04T04:07:39+00:00" }, { @@ -6135,10 +5707,6 @@ ], "description": "Library that helps with managing the version number of Git-hosted PHP projects", "homepage": "https://github.com/sebastianbergmann/version", - "support": { - "issues": "https://github.com/sebastianbergmann/version/issues", - "source": "https://github.com/sebastianbergmann/version/tree/master" - }, "time": "2016-10-03T07:35:21+00:00" }, { @@ -6189,9 +5757,6 @@ ], "description": "Symfony Process Component", "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/process/tree/5.1" - }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -6246,10 +5811,6 @@ } ], "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", - "support": { - "issues": "https://github.com/theseer/tokenizer/issues", - "source": "https://github.com/theseer/tokenizer/tree/master" - }, "funding": [ { "url": "https://github.com/theseer", @@ -6273,5 +5834,5 @@ "platform-overrides": { "php": "7.4.6" }, - "plugin-api-version": "2.0.0" + "plugin-api-version": "1.1.0" } diff --git a/src/Debugger.php b/src/Debugger.php deleted file mode 100644 index aff931b0df..0000000000 --- a/src/Debugger.php +++ /dev/null @@ -1,13 +0,0 @@ - + */ +class DebuggerFunctionRule implements \PHPStan\Rules\Rule +{ + + public function getNodeType(): string + { + return FuncCall::class + } + + public function processNode(Node $node, Scope $scope): array + { + if ($node->name !== 'PHPStan\dumpType') { + return []; + } + + return [$scope->getType($node->args[0]->value)->describe(VerbosityLevel::precise())]; + } +} diff --git a/src/debugger.php b/src/debugger.php new file mode 100644 index 0000000000..9b1e0189ec --- /dev/null +++ b/src/debugger.php @@ -0,0 +1,10 @@ + Date: Tue, 3 Nov 2020 20:08:15 +0000 Subject: [PATCH 4/8] Fix sytanx error --- src/Rules/Functions/DebuggerFunctionRule.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Rules/Functions/DebuggerFunctionRule.php b/src/Rules/Functions/DebuggerFunctionRule.php index 4dbe12f655..2821670ce2 100644 --- a/src/Rules/Functions/DebuggerFunctionRule.php +++ b/src/Rules/Functions/DebuggerFunctionRule.php @@ -5,8 +5,7 @@ use PhpParser\Node; use PhpParser\Node\Expr\FuncCall; use PHPStan\Analyser\Scope; -use PHPStan\Reflection\ReflectionProvider; -use PHPStan\Rules\RuleErrorBuilder; +use PHPStan\Type\VerbosityLevel; /** * @implements \PHPStan\Rules\Rule<\PhpParser\Node\Expr\FuncCall> @@ -16,7 +15,7 @@ class DebuggerFunctionRule implements \PHPStan\Rules\Rule public function getNodeType(): string { - return FuncCall::class + return FuncCall::class; } public function processNode(Node $node, Scope $scope): array From 0667821db49c4fb27367a2aeddddfdb43d20f42f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20Sz=C3=A9pe?= Date: Tue, 3 Nov 2020 20:13:08 +0000 Subject: [PATCH 5/8] Fix things --- src/Rules/Functions/DebuggerFunctionRule.php | 1 + src/debugger.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Rules/Functions/DebuggerFunctionRule.php b/src/Rules/Functions/DebuggerFunctionRule.php index 2821670ce2..dfaea22e33 100644 --- a/src/Rules/Functions/DebuggerFunctionRule.php +++ b/src/Rules/Functions/DebuggerFunctionRule.php @@ -26,4 +26,5 @@ public function processNode(Node $node, Scope $scope): array return [$scope->getType($node->args[0]->value)->describe(VerbosityLevel::precise())]; } + } diff --git a/src/debugger.php b/src/debugger.php index 9b1e0189ec..2e0141217a 100644 --- a/src/debugger.php +++ b/src/debugger.php @@ -3,7 +3,7 @@ namespace PHPStan; /** - * @var mixed $thing + * @param mixed $thing */ function dumpType($thing): void { From 31647ee8a6f7274ebeaa44a4fc9eab3223c8f6e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20Sz=C3=A9pe?= Date: Tue, 3 Nov 2020 20:29:30 +0000 Subject: [PATCH 6/8] Check Node --- src/Rules/Functions/DebuggerFunctionRule.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Rules/Functions/DebuggerFunctionRule.php b/src/Rules/Functions/DebuggerFunctionRule.php index dfaea22e33..86ff288ff3 100644 --- a/src/Rules/Functions/DebuggerFunctionRule.php +++ b/src/Rules/Functions/DebuggerFunctionRule.php @@ -20,7 +20,7 @@ public function getNodeType(): string public function processNode(Node $node, Scope $scope): array { - if ($node->name !== 'PHPStan\dumpType') { + if (!($node->name instanceof \PhpParser\Node\Name) || (string) $node->name !== 'PHPStan\\dumpType') { return []; } From 4fe9ec6b959e559581f9e3cb2ca3a9990e9e134b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20Sz=C3=A9pe?= Date: Tue, 3 Nov 2020 20:34:57 +0000 Subject: [PATCH 7/8] Ignore CS warning --- src/debugger.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/debugger.php b/src/debugger.php index 2e0141217a..5c0e1caa1b 100644 --- a/src/debugger.php +++ b/src/debugger.php @@ -4,6 +4,7 @@ /** * @param mixed $thing + * phpcs:ignore Squiz.Functions.GlobalFunction.Found */ function dumpType($thing): void { From 0bbaa55970339ecb539370d8c1adb34f8cfb3b54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20Sz=C3=A9pe?= Date: Tue, 3 Nov 2020 21:00:28 +0000 Subject: [PATCH 8/8] Fix CS --- src/debugger.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/debugger.php b/src/debugger.php index 5c0e1caa1b..ac0b0deb24 100644 --- a/src/debugger.php +++ b/src/debugger.php @@ -4,8 +4,7 @@ /** * @param mixed $thing - * phpcs:ignore Squiz.Functions.GlobalFunction.Found */ -function dumpType($thing): void +function dumpType($thing): void // phpcs:ignore Squiz.Functions.GlobalFunction.Found { }