diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 6750a47..018c4e8 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -30,7 +30,7 @@ jobs: with: phpstan: true mago: true - mago-version: '1.30' + mago-version: '1.58' # # Must be kept in sync with @../../mise.toml box: true box-php-version: '8.5' box-version: '4' diff --git a/mago.toml b/mago.toml index c379b48..71c0339 100644 --- a/mago.toml +++ b/mago.toml @@ -1,6 +1,6 @@ -#:schema https://mago.carthage.software/1.30.0/schema.json +#:schema https://mago.carthage.software/1.58.2/schema.json # Welcome to Mago! -# For full documentation, see https://mago.carthage.software/1.30.0/en/tools/overview/ +# For full documentation, see https://mago.carthage.software/1.58.2/en/tools/overview/ version = "1" php-version = "8.5.0" @@ -25,13 +25,14 @@ literal-named-argument = { enabled = false } halstead = { effort-threshold = 7000 } [analyzer] -excludes = ["tests/**/*.php"] plugins = [] +excludes = ["tests/"] # Doesn't work well with mockery. find-unused-definitions = true find-unused-expressions = true analyze-dead-code = true memoize-properties = true -check-throws = false +check-throws = false # Adding @throws yields little benefits. +check-dead-catch = false unchecked-exceptions = ["Error", "LogicException"] unchecked-exception-classes = [] check-missing-override = true @@ -39,6 +40,7 @@ find-unused-parameters = true strict-list-index-checks = true strict-array-index-existence = true allow-array-truthy-operand = false +allow-operator-overloading = false no-boolean-literal-comparison = true check-missing-type-hints = true register-super-globals = true diff --git a/mise.toml b/mise.toml index 5b26de0..9f057b4 100644 --- a/mise.toml +++ b/mise.toml @@ -2,7 +2,7 @@ GOFLAGS = '-mod=mod' [tools] -mago = "1.30" # Must be kept in sync with @.github/workflows/lint.yml +mago = "1.58" # Must be kept in sync with @.github/workflows/lint.yml [tasks.phar] depends = ['vendor:no-dev']