diff --git a/composer.json b/composer.json index 9873b08b..60856cef 100644 --- a/composer.json +++ b/composer.json @@ -6,17 +6,11 @@ "autoload-dev": { "psr-4": { "": "lib/" - }, - "files": [ - "lib/Constants.php" - ] + } }, "autoload": { "classmap": [ "lib/" - ], - "files": [ - "lib/Constants.php" ] }, "require-dev": { diff --git a/composer.lock b/composer.lock index 3801d496..594c3b76 100644 --- a/composer.lock +++ b/composer.lock @@ -8,16 +8,16 @@ "packages": [ { "name": "brick/math", - "version": "0.12.2", + "version": "0.12.3", "source": { "type": "git", "url": "https://github.com/brick/math.git", - "reference": "901eddb1e45a8e0f689302e40af871c181ecbe40" + "reference": "866551da34e9a618e64a819ee1e01c20d8a588ba" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/brick/math/zipball/901eddb1e45a8e0f689302e40af871c181ecbe40", - "reference": "901eddb1e45a8e0f689302e40af871c181ecbe40", + "url": "https://api.github.com/repos/brick/math/zipball/866551da34e9a618e64a819ee1e01c20d8a588ba", + "reference": "866551da34e9a618e64a819ee1e01c20d8a588ba", "shasum": "" }, "require": { @@ -56,7 +56,7 @@ ], "support": { "issues": "https://github.com/brick/math/issues", - "source": "https://github.com/brick/math/tree/0.12.2" + "source": "https://github.com/brick/math/tree/0.12.3" }, "funding": [ { @@ -64,7 +64,7 @@ "type": "github" } ], - "time": "2025-02-26T10:21:45+00:00" + "time": "2025-02-28T13:11:00+00:00" }, { "name": "erusev/parsedown", diff --git a/config/phpstan/phpstan.neon b/config/phpstan/phpstan.neon index 08a9547d..35b1d6b8 100644 --- a/config/phpstan/phpstan.neon +++ b/config/phpstan/phpstan.neon @@ -4,11 +4,15 @@ includes: - ../../vendor/thecodingmachine/phpstan-safe-rule/phpstan-safe-rule.neon parameters: + level: 9 + ignoreErrors: - # Ignore errors caused by Template static class reflection + # Ignore errors caused by `Template` static class reflection. - '#Call to an undefined static method Template::[a-zA-Z0-9\\_]+\(\)\.#' - level: - 9 + + bootstrapFiles: + - %rootDir%/../../../lib/Constants.php + paths: - %rootDir%/../../../lib - %rootDir%/../../../www @@ -23,23 +27,23 @@ parameters: - %rootDir%/../../../scripts/update-patrons-circle - %rootDir%/../../../scripts/update-project-statuses - %rootDir%/../../../templates + dynamicConstantNames: - SITE_STATUS - DONATION_DRIVES_ENABLED - DONATION_DRIVE_COUNTER_ENABLED - earlyTerminatingMethodCalls: - Template: - - Emit403 - - Emit404 - - RedirectToLogin + exceptions: # PHPStan only uses PHPDocs to compute exception bubbling; without this line, PHPStan assumes that any function without a `@throws` doc throws any number of exceptions, instead of no exceptions. implicitThrows: false + check: missingCheckedExceptionInThrows: true tooWideThrowType: true + uncheckedExceptionRegexes: - -'#^Safe\\#' + - '#^Safe\\#' + uncheckedExceptionClasses: - 'Exceptions\DatabaseQueryException' - 'Exceptions\MultiSelectMethodNotFoundException' diff --git a/lib/Constants.php b/lib/Constants.php index 47c5f9d8..f93ae232 100644 --- a/lib/Constants.php +++ b/lib/Constants.php @@ -1,5 +1,4 @@