diff --git a/composer.json b/composer.json index 718e4b1..acf49cf 100644 --- a/composer.json +++ b/composer.json @@ -37,7 +37,7 @@ "require-dev": { "johnkary/phpunit-speedtrap": "^4.0", "phlak/coding-standards": "^2.0", - "phpstan/phpstan": "^0.12.99", + "phpstan/phpstan": "^1.0", "psy/psysh": "^0.10", "symfony/var-dumper": "^5.0", "yoast/phpunit-polyfills": "^1.0" diff --git a/composer.lock b/composer.lock index ee48c39..6d9b95f 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "51e0b90d4973d005f40ba9c8703ce1e4", + "content-hash": "8c15a4bbb402ec6c7e004fdb4a3505f8", "packages": [ { "name": "erusev/parsedown", @@ -3824,16 +3824,16 @@ }, { "name": "phpstan/phpstan", - "version": "0.12.99", + "version": "1.0.0", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "b4d40f1d759942f523be267a1bab6884f46ca3f7" + "reference": "0d13a99513182e521271d46bde8f28caa4f84d97" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/b4d40f1d759942f523be267a1bab6884f46ca3f7", - "reference": "b4d40f1d759942f523be267a1bab6884f46ca3f7", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/0d13a99513182e521271d46bde8f28caa4f84d97", + "reference": "0d13a99513182e521271d46bde8f28caa4f84d97", "shasum": "" }, "require": { @@ -3849,7 +3849,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "0.12-dev" + "dev-master": "1.0-dev" } }, "autoload": { @@ -3864,7 +3864,7 @@ "description": "PHPStan - PHP Static Analysis Tool", "support": { "issues": "https://github.com/phpstan/phpstan/issues", - "source": "https://github.com/phpstan/phpstan/tree/0.12.99" + "source": "https://github.com/phpstan/phpstan/tree/1.0.0" }, "funding": [ { @@ -3884,7 +3884,7 @@ "type": "tidelift" } ], - "time": "2021-09-12T20:09:55+00:00" + "time": "2021-11-01T06:38:20+00:00" }, { "name": "phpunit/php-code-coverage", diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 2e4a244..feaee0b 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -85,6 +85,16 @@ parameters: count: 1 path: app/src/ViewFunctions/Breadcrumbs.php + - + message: "#^Dead catch \\- RuntimeException is never thrown in the try block\\.$#" + count: 1 + path: app/src/ViewFunctions/ModifiedTime.php + + - + message: "#^Dead catch \\- RuntimeException is never thrown in the try block\\.$#" + count: 1 + path: app/src/ViewFunctions/SizeForHumans.php + - message: "#^Parameter \\#1 \\$finfo of function finfo_buffer expects resource, resource\\|false given\\.$#" count: 1 diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 3355b10..789b36b 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -16,11 +16,12 @@ parameters: checkFunctionNameCase: true checkMissingIterableValueType: false - implicitThrows: false reportUnmatchedIgnoredErrors: false exceptions: + implicitThrows: false + check: missingCheckedExceptionInThrows: true tooWideThrowType: true