Skip to content

Commit 8d32375

Browse files
authored
Merge pull request #1039 from cakephp/5.x-update-stan
update stan
2 parents 9353638 + ea1bc20 commit 8d32375

File tree

9 files changed

+5
-17
lines changed

9 files changed

+5
-17
lines changed

.phive/phars.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<phive xmlns="https://phar.io/phive">
3-
<phar name="phpstan" version="2.1.0" installed="2.1.0" location="./tools/phpstan" copy="false"/>
4-
<phar name="psalm" version="5.26.1" installed="5.26.1" location="./tools/psalm" copy="false"/>
3+
<phar name="phpstan" version="2.1.17" installed="2.1.17" location="./tools/phpstan" copy="false"/>
54
</phive>

composer.json

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,7 @@
6363
"cs-check": "phpcs --colors --parallel=16 -p src/ tests/",
6464
"cs-fix": "phpcbf --colors --parallel=16 -p src/ tests/",
6565
"phpstan": "tools/phpstan analyse",
66-
"psalm": "tools/psalm --show-info=false",
67-
"psalm-baseline": "tools/psalm --set-baseline=psalm-baseline.xml",
68-
"stan": [
69-
"@phpstan",
70-
"@psalm"
71-
],
66+
"stan": "@phpstan",
7267
"stan-baseline": "tools/phpstan --generate-baseline",
7368
"stan-setup": "phive install",
7469
"test": "phpunit"

src/Cache/Engine/DebugEngine.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ public function __construct(CacheEngine|array $config, string $name, LoggerInter
8282
*/
8383
public function init(array $config = []): bool
8484
{
85-
/** @psalm-suppress RedundantPropertyInitializationCheck */
8685
if (!isset($this->_engine)) {
8786
$registry = new CacheRegistry();
8887
$this->_engine = $registry->load('spies', $this->_config);
@@ -335,7 +334,6 @@ public function clearGroup(string $group): bool
335334
*/
336335
public function __toString(): string
337336
{
338-
/** @psalm-suppress RedundantPropertyInitializationCheck */
339337
if (isset($this->_engine)) {
340338
// phpcs:ignore SlevomatCodingStandard.Variables.UnusedVariable.UnusedVariable
341339
[$ns, $class] = namespaceSplit(get_class($this->_engine));

src/Database/Log/DebugLog.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,6 @@ public function log($level, string|Stringable $message, array $context = []): vo
203203
*/
204204
protected function isSchemaQuery(LoggedQuery $query): bool
205205
{
206-
/** @psalm-suppress InternalMethod */
207206
$querystring = $query->jsonSerialize()['query'];
208207

209208
return // Multiple engines

src/DebugInclude.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ public function __construct()
8282
*/
8383
public function includePaths(): array
8484
{
85-
/** @psalm-suppress RedundantCast */
8685
$paths = explode(PATH_SEPARATOR, (string)get_include_path());
8786
$paths = array_filter($paths, function ($path) {
8887
if ($path === '.' || strlen($path) === 0) {

src/Mailer/Transport/DebugKitTransport.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ public function __construct(array $config = [], ?AbstractTransport $originalTran
5757

5858
if ($className) {
5959
unset($config['originalClassName'], $config['debugKitLog']);
60-
/** @psalm-suppress UnsafeInstantiation */
6160
$this->originalTransport = new $className($config);
6261
}
6362
}

src/Middleware/DebugKitMiddleware.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ public function process(ServerRequestInterface $request, RequestHandlerInterface
6363
return $response;
6464
}
6565

66-
/** @psalm-suppress ArgumentTypeCoercion */
6766
$row = $this->service->saveData($request, $response);
6867
if (!$row) {
6968
return $response;

src/Model/Table/SqlTraceTrait.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,11 @@ public function deleteQuery(): DeleteQuery
5757
*
5858
* @template T of \Cake\ORM\Query\SelectQuery|\Cake\ORM\Query\UpdateQuery|\Cake\ORM\Query\DeleteQuery
5959
* @param \Cake\ORM\Query\SelectQuery|\Cake\ORM\Query\UpdateQuery|\Cake\ORM\Query\DeleteQuery $query The Query to insert a comment into.
60-
* @psalm-param T $query
60+
* @phpstan-param T $query
6161
* @param int $start How many entries in the stack trace to skip.
6262
* @param bool $debugOnly False to always stamp queries with a comment.
6363
* @return \Cake\ORM\Query\SelectQuery|\Cake\ORM\Query\UpdateQuery|\Cake\ORM\Query\DeleteQuery
64-
* @psalm-return T
64+
* @phpstan-return T
6565
*/
6666
protected function fileStamp(
6767
SelectQuery|UpdateQuery|DeleteQuery $query,

src/Panel/PanelRegistry.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ protected function _throwMissingClassError(string $class, ?string $plugin): void
8787
protected function _create(object|string $class, string $alias, array $config): DebugPanel
8888
{
8989
if (is_string($class)) {
90-
$instance = new $class($this, $config);
90+
$instance = new $class();
9191
} else {
9292
$instance = $class;
9393
}

0 commit comments

Comments
 (0)