diff --git a/.phive/phars.xml b/.phive/phars.xml index a655ee468..f5aa33004 100644 --- a/.phive/phars.xml +++ b/.phive/phars.xml @@ -1,5 +1,4 @@ - - + diff --git a/composer.json b/composer.json index 7622716bd..c2d511141 100644 --- a/composer.json +++ b/composer.json @@ -63,12 +63,7 @@ "cs-check": "phpcs --colors --parallel=16 -p src/ tests/", "cs-fix": "phpcbf --colors --parallel=16 -p src/ tests/", "phpstan": "tools/phpstan analyse", - "psalm": "tools/psalm --show-info=false", - "psalm-baseline": "tools/psalm --set-baseline=psalm-baseline.xml", - "stan": [ - "@phpstan", - "@psalm" - ], + "stan": "@phpstan", "stan-baseline": "tools/phpstan --generate-baseline", "stan-setup": "phive install", "test": "phpunit" diff --git a/src/Cache/Engine/DebugEngine.php b/src/Cache/Engine/DebugEngine.php index ef8e4c997..3c4e2e22e 100644 --- a/src/Cache/Engine/DebugEngine.php +++ b/src/Cache/Engine/DebugEngine.php @@ -82,7 +82,6 @@ public function __construct(CacheEngine|array $config, string $name, LoggerInter */ public function init(array $config = []): bool { - /** @psalm-suppress RedundantPropertyInitializationCheck */ if (!isset($this->_engine)) { $registry = new CacheRegistry(); $this->_engine = $registry->load('spies', $this->_config); @@ -335,7 +334,6 @@ public function clearGroup(string $group): bool */ public function __toString(): string { - /** @psalm-suppress RedundantPropertyInitializationCheck */ if (isset($this->_engine)) { // phpcs:ignore SlevomatCodingStandard.Variables.UnusedVariable.UnusedVariable [$ns, $class] = namespaceSplit(get_class($this->_engine)); diff --git a/src/Database/Log/DebugLog.php b/src/Database/Log/DebugLog.php index 596c83f44..979e5cede 100644 --- a/src/Database/Log/DebugLog.php +++ b/src/Database/Log/DebugLog.php @@ -203,7 +203,6 @@ public function log($level, string|Stringable $message, array $context = []): vo */ protected function isSchemaQuery(LoggedQuery $query): bool { - /** @psalm-suppress InternalMethod */ $querystring = $query->jsonSerialize()['query']; return // Multiple engines diff --git a/src/DebugInclude.php b/src/DebugInclude.php index 1c369ebac..944c5308f 100644 --- a/src/DebugInclude.php +++ b/src/DebugInclude.php @@ -82,7 +82,6 @@ public function __construct() */ public function includePaths(): array { - /** @psalm-suppress RedundantCast */ $paths = explode(PATH_SEPARATOR, (string)get_include_path()); $paths = array_filter($paths, function ($path) { if ($path === '.' || strlen($path) === 0) { diff --git a/src/Mailer/Transport/DebugKitTransport.php b/src/Mailer/Transport/DebugKitTransport.php index 7dc24b8dc..0cd510160 100644 --- a/src/Mailer/Transport/DebugKitTransport.php +++ b/src/Mailer/Transport/DebugKitTransport.php @@ -57,7 +57,6 @@ public function __construct(array $config = [], ?AbstractTransport $originalTran if ($className) { unset($config['originalClassName'], $config['debugKitLog']); - /** @psalm-suppress UnsafeInstantiation */ $this->originalTransport = new $className($config); } } diff --git a/src/Middleware/DebugKitMiddleware.php b/src/Middleware/DebugKitMiddleware.php index e2a02d4b8..39f3f07a9 100644 --- a/src/Middleware/DebugKitMiddleware.php +++ b/src/Middleware/DebugKitMiddleware.php @@ -63,7 +63,6 @@ public function process(ServerRequestInterface $request, RequestHandlerInterface return $response; } - /** @psalm-suppress ArgumentTypeCoercion */ $row = $this->service->saveData($request, $response); if (!$row) { return $response; diff --git a/src/Model/Table/SqlTraceTrait.php b/src/Model/Table/SqlTraceTrait.php index 7258e3d8f..a9d79c712 100644 --- a/src/Model/Table/SqlTraceTrait.php +++ b/src/Model/Table/SqlTraceTrait.php @@ -57,11 +57,11 @@ public function deleteQuery(): DeleteQuery * * @template T of \Cake\ORM\Query\SelectQuery|\Cake\ORM\Query\UpdateQuery|\Cake\ORM\Query\DeleteQuery * @param \Cake\ORM\Query\SelectQuery|\Cake\ORM\Query\UpdateQuery|\Cake\ORM\Query\DeleteQuery $query The Query to insert a comment into. - * @psalm-param T $query + * @phpstan-param T $query * @param int $start How many entries in the stack trace to skip. * @param bool $debugOnly False to always stamp queries with a comment. * @return \Cake\ORM\Query\SelectQuery|\Cake\ORM\Query\UpdateQuery|\Cake\ORM\Query\DeleteQuery - * @psalm-return T + * @phpstan-return T */ protected function fileStamp( SelectQuery|UpdateQuery|DeleteQuery $query, diff --git a/src/Panel/PanelRegistry.php b/src/Panel/PanelRegistry.php index 5c26be88a..2cac0fd71 100644 --- a/src/Panel/PanelRegistry.php +++ b/src/Panel/PanelRegistry.php @@ -87,7 +87,7 @@ protected function _throwMissingClassError(string $class, ?string $plugin): void protected function _create(object|string $class, string $alias, array $config): DebugPanel { if (is_string($class)) { - $instance = new $class($this, $config); + $instance = new $class(); } else { $instance = $class; }