Skip to content

Commit

Permalink
Merge pull request #768 from cakephp/4.x-update-stan
Browse files Browse the repository at this point in the history
update stan
  • Loading branch information
markstory authored Nov 18, 2024
2 parents 9a2203b + 9f846de commit af43054
Show file tree
Hide file tree
Showing 16 changed files with 211 additions and 83 deletions.
4 changes: 2 additions & 2 deletions .phive/phars.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<phive xmlns="https://phar.io/phive">
<phar name="phpstan" version="1.11.9" installed="1.11.9" location="./tools/phpstan" copy="false"/>
<phar name="psalm" version="5.25.0" installed="5.25.0" location="./tools/psalm" copy="false"/>
<phar name="phpstan" version="2.0.1" installed="2.0.1" location="./tools/phpstan" copy="false"/>
<phar name="psalm" version="5.26.1" installed="5.26.1" location="./tools/psalm" copy="false"/>
</phive>
140 changes: 119 additions & 21 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
@@ -1,71 +1,169 @@
parameters:
ignoreErrors:
-
message: "#^Call to an undefined method object\\:\\:loadHelper\\(\\)\\.$#"
message: '#^Call to an undefined method object\:\:loadHelper\(\)\.$#'
identifier: method.notFound
count: 1
path: src/Command/BakeMigrationCommand.php

-
message: "#^Call to an undefined method object\\:\\:loadHelper\\(\\)\\.$#"
message: '#^Parameter \#1 \$arguments of method Migrations\\Util\\ColumnParser\:\:parseFields\(\) expects array\<string\>, array\<int\<min, \-1\>\|int\<1, max\>, list\<string\>\|string\> given\.$#'
identifier: argument.type
count: 1
path: src/Command/BakeMigrationCommand.php

-
message: '#^Parameter \#1 \$arguments of method Migrations\\Util\\ColumnParser\:\:parseIndexes\(\) expects array\<string\>, array\<int\<min, \-1\>\|int\<1, max\>, list\<string\>\|string\> given\.$#'
identifier: argument.type
count: 1
path: src/Command/BakeMigrationCommand.php

-
message: '#^Parameter \#1 \$arguments of method Migrations\\Util\\ColumnParser\:\:parsePrimaryKey\(\) expects array\<string\>, array\<int\<min, \-1\>\|int\<1, max\>, list\<string\>\|string\> given\.$#'
identifier: argument.type
count: 1
path: src/Command/BakeMigrationCommand.php

-
message: '#^Call to an undefined method object\:\:loadHelper\(\)\.$#'
identifier: method.notFound
count: 1
path: src/Command/BakeMigrationDiffCommand.php

-
message: "#^Call to an undefined method object\\:\\:loadHelper\\(\\)\\.$#"
message: '#^Call to an undefined method object\:\:loadHelper\(\)\.$#'
identifier: method.notFound
count: 1
path: src/Command/BakeMigrationSnapshotCommand.php

-
message: "#^Unsafe usage of new static\\(\\)\\.$#"
message: '#^PHPDoc tag @var with type string is not subtype of native type non\-falsy\-string\|true\.$#'
identifier: varTag.nativeType
count: 1
path: src/Command/BakeSeedCommand.php

-
message: '#^Strict comparison using \!\=\= between string and false will always evaluate to true\.$#'
identifier: notIdentical.alwaysTrue
count: 1
path: src/Command/BakeSeedCommand.php

-
message: '#^Call to an undefined method Cake\\Datasource\\ConnectionInterface\:\:cacheMetadata\(\)\.$#'
identifier: method.notFound
count: 1
path: src/Command/Phinx/CacheBuild.php

-
message: '#^Call to an undefined method Cake\\Datasource\\ConnectionInterface\:\:cacheMetadata\(\)\.$#'
identifier: method.notFound
count: 1
path: src/Command/Phinx/CacheClear.php

-
message: '#^Unsafe usage of new static\(\)\.$#'
identifier: new.static
count: 1
path: src/Db/Adapter/AdapterFactory.php

-
message: "#^Offset 'id' on non\\-empty\\-array\\<string, mixed\\> in isset\\(\\) always exists and is not nullable\\.$#"
message: '#^Offset ''id'' on non\-empty\-array\<string, mixed\> in isset\(\) always exists and is not nullable\.$#'
identifier: isset.offset
count: 2
path: src/Db/Adapter/MysqlAdapter.php

-
message: "#^Right side of && is always true\\.$#"
message: '#^Offset 3 might not exist on array\{0\: string, 1\: non\-empty\-string, 2\?\: string, 3\?\: ''''\|numeric\-string, 4\?\: string, 5\?\: ''''\|numeric\-string, 6\?\: non\-empty\-string\}\.$#'
identifier: offsetAccess.notFound
count: 1
path: src/Db/Adapter/MysqlAdapter.php

-
message: "#^Access to an undefined property Cake\\\\Database\\\\Connection\\:\\:\\$connection\\.$#"
message: '#^Offset 5 might not exist on array\{0\: string, 1\: non\-empty\-string, 2\?\: string, 3\?\: ''''\|numeric\-string, 4\?\: string, 5\?\: ''''\|numeric\-string, 6\?\: non\-empty\-string\}\.$#'
identifier: offsetAccess.notFound
count: 1
path: src/Db/Adapter/PdoAdapter.php
path: src/Db/Adapter/MysqlAdapter.php

-
message: "#^Offset 'id' on array\\<string, mixed\\> in isset\\(\\) always exists and is not nullable\\.$#"
count: 2
path: src/Db/Adapter/PostgresAdapter.php
message: '#^Offset 6 might not exist on array\{0\: string, 1\: non\-empty\-string, 2\?\: string, 3\?\: ''''\|numeric\-string, 4\?\: string, 5\?\: ''''\|numeric\-string, 6\?\: non\-empty\-string\}\.$#'
identifier: offsetAccess.notFound
count: 1
path: src/Db/Adapter/MysqlAdapter.php

-
message: "#^Offset 'id' on array\\<string, mixed\\> in isset\\(\\) always exists and is not nullable\\.$#"
count: 2
path: src/Db/Adapter/SqliteAdapter.php
message: '#^Right side of && is always true\.$#'
identifier: booleanAnd.rightAlwaysTrue
count: 1
path: src/Db/Adapter/MysqlAdapter.php

-
message: "#^Offset 'id' on array\\<string, mixed\\> in isset\\(\\) always exists and is not nullable\\.$#"
count: 2
path: src/Db/Adapter/SqlserverAdapter.php
message: '#^Right side of && is always true\.$#'
identifier: booleanAnd.rightAlwaysTrue
count: 1
path: src/Db/Adapter/SqliteAdapter.php

-
message: "#^PHPDoc tag @return with type Phinx\\\\Db\\\\Adapter\\\\AdapterInterface is not subtype of native type Migrations\\\\Db\\\\Adapter\\\\AdapterInterface\\.$#"
message: '#^PHPDoc tag @return with type Phinx\\Db\\Adapter\\AdapterInterface is not subtype of native type Migrations\\Db\\Adapter\\AdapterInterface\.$#'
identifier: return.phpDocType
count: 1
path: src/Db/Adapter/SqlserverAdapter.php

-
message: "#^Ternary operator condition is always true\\.$#"
message: '#^Ternary operator condition is always true\.$#'
identifier: ternary.alwaysTrue
count: 2
path: src/Db/Adapter/SqlserverAdapter.php

-
message: "#^Method Migrations\\\\Shim\\\\OutputAdapter\\:\\:getVerbosity\\(\\) should return 16\\|32\\|64\\|128\\|256 but returns int\\.$#"
message: '#^Parameter \#1 \$message of method Cake\\Console\\ConsoleIo\:\:verbose\(\) expects list\<string\>\|string, array\<non\-falsy\-string\> given\.$#'
identifier: argument.type
count: 1
path: src/Migration/Manager.php

-
message: '#^Parameter \#1 \.\.\.\$arg1 of function max expects non\-empty\-array, array given\.$#'
identifier: argument.type
count: 1
path: src/Migration/Manager.php

-
message: '#^PHPDoc tag @var with type array\<string, string\> is not subtype of native type mixed\.$#'
identifier: varTag.nativeType
count: 1
path: src/Migration/ManagerFactory.php

-
message: '#^Method Migrations\\Shim\\OutputAdapter\:\:getVerbosity\(\) should return 16\|32\|64\|128\|256 but returns int\.$#'
identifier: return.type
count: 1
path: src/Shim/OutputAdapter.php

-
message: "#^Possibly invalid array key type Cake\\\\Database\\\\Schema\\\\TableSchemaInterface\\|string\\.$#"
message: '#^Parameter \#1 \$message of method Cake\\Console\\ConsoleIo\:\:out\(\) expects list\<string\>\|string, array\|string given\.$#'
identifier: argument.type
count: 2
path: src/Shim/OutputAdapter.php

-
message: '#^Parameter \#2 \$tables of method Cake\\TestSuite\\ConnectionHelper\:\:dropTables\(\) expects list\<string\>\|null, non\-empty\-array\<string\> given\.$#'
identifier: argument.type
count: 1
path: src/TestSuite/Migrator.php

-
message: '#^Parameter \#2 \$tables of method Cake\\TestSuite\\ConnectionHelper\:\:truncateTables\(\) expects list\<string\>\|null, non\-empty\-array\<string\> given\.$#'
identifier: argument.type
count: 2
path: src/TestSuite/Migrator.php

-
message: '#^Offset 0 on non\-empty\-list\<string\> in isset\(\) always exists and is not nullable\.$#'
identifier: isset.offset
count: 2
path: src/Util/TableFinder.php

-
message: '#^Possibly invalid array key type Cake\\Database\\Schema\\TableSchemaInterface\|string\.$#'
identifier: offsetAccess.invalidOffset
count: 2
path: src/View/Helper/MigrationHelper.php
Loading

0 comments on commit af43054

Please sign in to comment.