Skip to content

Commit

Permalink
chore: update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
tpetry committed Dec 5, 2024
1 parent 5a7e940 commit 134caf3
Show file tree
Hide file tree
Showing 3 changed files with 119 additions and 22 deletions.
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@
"require-dev": {
"composer/semver": "^3.4",
"friendsofphp/php-cs-fixer": "^2.19.3|^3.5.0",
"larastan/larastan": "^1.0|^2.1|^3.0",
"nesbot/carbon": "^2.7|^3.3",
"nunomaduro/larastan": "^1.0|^2.1",
"orchestra/testbench": "^4.0|^5.0|^6.0|^7.0|^8.0|^9.0",
"phpstan/extension-installer": "^1.1",
"phpstan/phpstan": "^1.5",
"phpunit/phpunit": "^8.5.23|^9.5.13|^10.5",
"phpstan/phpstan": "^1.5|^2.0",
"phpunit/phpunit": "^8.5.23|^9.5.13|^10.5|^11.4",
"ramsey/uuid": "^3.9|^4.7"
},
"autoload": {
Expand Down
115 changes: 115 additions & 0 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
parameters:
ignoreErrors:
-
message: '#^Anonymous function should return Illuminate\\Database\\Eloquent\\Collection but returns Illuminate\\Support\\Collection\<int, object\>\.$#'
identifier: return.type
count: 1
path: src/Eloquent/Mixins/BuilderReturning.php

-
message: '#^Call to an undefined method Illuminate\\Database\\Eloquent\\Builder\:\:forceDeleteReturning\(\)\.$#'
identifier: method.notFound
count: 1
path: src/Eloquent/Mixins/BuilderReturning.php

-
message: '#^Call to protected method addTimestampsToUpsertValues\(\) of class Illuminate\\Database\\Eloquent\\Builder\<Illuminate\\Database\\Eloquent\\Model\>\.$#'
identifier: method.protected
count: 1
path: src/Eloquent/Mixins/BuilderReturning.php

-
message: '#^Call to protected method addUpdatedAtColumn\(\) of class Illuminate\\Database\\Eloquent\\Builder\<Illuminate\\Database\\Eloquent\\Model\>\.$#'
identifier: method.protected
count: 1
path: src/Eloquent/Mixins/BuilderReturning.php

-
message: '#^Call to protected method addUpdatedAtToUpsertColumns\(\) of class Illuminate\\Database\\Eloquent\\Builder\<Illuminate\\Database\\Eloquent\\Model\>\.$#'
identifier: method.protected
count: 1
path: src/Eloquent/Mixins/BuilderReturning.php

-
message: '#^PHPDoc tag @var with type Illuminate\\Database\\Eloquent\\Builder is not subtype of native type \$this\(Tpetry\\PostgresqlEnhanced\\Eloquent\\Mixins\\BuilderReturning\)\.$#'
identifier: varTag.nativeType
count: 1
path: src/Eloquent/Mixins/BuilderReturning.php

-
message: '#^Call to function method_exists\(\) with Tpetry\\PostgresqlEnhanced\\Query\\Grammar and ''setConnection'' will always evaluate to true\.$#'
identifier: function.alreadyNarrowedType
count: 1
path: src/PostgresEnhancedConnection.php

-
message: '#^Call to function method_exists\(\) with Tpetry\\PostgresqlEnhanced\\Schema\\Grammars\\Grammar and ''setConnection'' will always evaluate to true\.$#'
identifier: function.alreadyNarrowedType
count: 1
path: src/PostgresEnhancedConnection.php

-
message: '#^Call to function method_exists\(\) with \$this\(Tpetry\\PostgresqlEnhanced\\Query\\Builder\) and ''applyBeforeQueryCal…'' will always evaluate to true\.$#'
identifier: function.alreadyNarrowedType
count: 7
path: src/Query/Builder.php

-
message: '#^Return type \(array\<int, string\>\) of method Tpetry\\PostgresqlEnhanced\\Schema\\Grammars\\Grammar\:\:compileAdd\(\) should be compatible with return type \(string\) of method Illuminate\\Database\\Schema\\Grammars\\PostgresGrammar\:\:compileAdd\(\)$#'
identifier: method.childReturnType
count: 1
path: src/Schema/Grammars/Grammar.php

-
message: '#^Call to an undefined method Illuminate\\Database\\Migrations\\Migration\:\:timeoutDown\(\)\.$#'
identifier: method.notFound
count: 1
path: src/Support/Helpers/ZeroDowntimeMigrationSupervisor.php

-
message: '#^Call to an undefined method Illuminate\\Database\\Migrations\\Migration\:\:timeoutUp\(\)\.$#'
identifier: method.notFound
count: 1
path: src/Support/Helpers/ZeroDowntimeMigrationSupervisor.php

-
message: '#^Call to an undefined method Illuminate\\Database\\Eloquent\\Builder\<Tpetry\\PostgresqlEnhanced\\Tests\\Eloquent\\Example\>\:\:forceDeleteReturning\(\)\.$#'
identifier: method.notFound
count: 3
path: tests/Eloquent/BuilderReturningTest.php

-
message: '#^Call to function property_exists\(\) with \$this\(Illuminate\\Database\\Migrations\\Migration@anonymous/tests/Migration/ZeroDowntimeMigrationTest\.php\:24\) and ''timeout'' will always evaluate to true\.$#'
identifier: function.alreadyNarrowedType
count: 2
path: tests/Migration/ZeroDowntimeMigrationTest.php

-
message: '#^Call to function property_exists\(\) with \$this\(Illuminate\\Database\\Migrations\\Migration@anonymous/tests/Migration/ZeroDowntimeMigrationTest\.php\:36\) and ''timeout'' will always evaluate to true\.$#'
identifier: function.alreadyNarrowedType
count: 2
path: tests/Migration/ZeroDowntimeMigrationTest.php

-
message: '#^Call to function property_exists\(\) with \$this\(Illuminate\\Database\\Migrations\\Migration@anonymous/tests/Migration/ZeroDowntimeMigrationTest\.php\:45\) and ''timeout'' will always evaluate to true\.$#'
identifier: function.alreadyNarrowedType
count: 2
path: tests/Migration/ZeroDowntimeMigrationTest.php

-
message: '#^Call to function property_exists\(\) with \$this\(Illuminate\\Database\\Migrations\\Migration@anonymous/tests/Migration/ZeroDowntimeMigrationTest\.php\:55\) and ''timeout'' will always evaluate to true\.$#'
identifier: function.alreadyNarrowedType
count: 2
path: tests/Migration/ZeroDowntimeMigrationTest.php

-
message: '#^Call to function property_exists\(\) with \$this\(Illuminate\\Database\\Migrations\\Migration@anonymous/tests/Migration/ZeroDowntimeMigrationTest\.php\:66\) and ''timeout'' will always evaluate to true\.$#'
identifier: function.alreadyNarrowedType
count: 2
path: tests/Migration/ZeroDowntimeMigrationTest.php

-
message: '#^Call to function property_exists\(\) with \$this\(Illuminate\\Database\\Migrations\\Migration@anonymous/tests/Migration/ZeroDowntimeMigrationTest\.php\:70\) and ''timeout'' will always evaluate to true\.$#'
identifier: function.alreadyNarrowedType
count: 2
path: tests/Migration/ZeroDowntimeMigrationTest.php
20 changes: 1 addition & 19 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
@@ -1,27 +1,9 @@
includes:
- phpstan-extension.neon
- phpstan-baseline.neon

parameters:
level: 5
paths:
- src
- tests
ignoreErrors:
# Laravel does not know of lateral joins and probably wouldn't merge a PR extending all join types with expressions
- message: "#^Parameter \\#3 \\$table of method Illuminate\\\\Database\\\\Query\\\\Builder\\:\\:newJoinClause\\(\\) expects string, Illuminate\\\\Database\\\\Query\\\\Expression given\\.$#"
path: src/Query/Builder.php
# The eloquent builder mixin is calling protected methods because it's part of the builder object
- message: "#^Call to protected method addTimestampsToUpsertValues\\(\\) of class Illuminate\\\\Database\\\\Eloquent\\\\Builder<Illuminate\\\\Database\\\\Eloquent\\\\Model>\\.$#"
path: src/Eloquent/Mixins/BuilderReturning.php
- message: "#^Call to protected method addUpdatedAtToUpsertColumns\\(\\) of class Illuminate\\\\Database\\\\Eloquent\\\\Builder<Illuminate\\\\Database\\\\Eloquent\\\\Model>\\.$#"
path: src/Eloquent/Mixins/BuilderReturning.php
- message: "#^Call to protected method addUpdatedAtColumn\\(\\) of class Illuminate\\\\Database\\\\Eloquent\\\\Builder<Illuminate\\\\Database\\\\Eloquent\\\\Model>\\.$#"
path: src/Eloquent/Mixins/BuilderReturning.php
# It's impossible to statically test whether a class uses an trait in PHPStan
- message: "#^Call to an undefined method Illuminate\\\\Database\\\\Migrations\\\\Migration\\:\\:timeoutDown\\(\\)\\.$#"
path: src/Support/Helpers/ZeroDowntimeMigrationSupervisor.php
- message: "#^Call to an undefined method Illuminate\\\\Database\\\\Migrations\\\\Migration\\:\\:timeoutUp\\(\\)\\.$#"
path: src/Support/Helpers/ZeroDowntimeMigrationSupervisor.php
# The compileAdd() method should return a string which will be cast to an array. As two queries need to be generated an array is returned
- message: "#^Return type \\(array\\<int, string\\>\\) of method Tpetry\\\\PostgresqlEnhanced\\\\Schema\\\\Grammars\\\\Grammar\\:\\:compileAdd\\(\\) should be compatible with return type \\(string\\) of method Illuminate\\\\Database\\\\Schema\\\\Grammars\\\\PostgresGrammar\\:\\:compileAdd\\(\\)$#"
path: src/Schema/Grammars/Grammar.php

0 comments on commit 134caf3

Please sign in to comment.