diff --git a/composer.json b/composer.json index 8e15100..5a66f9a 100644 --- a/composer.json +++ b/composer.json @@ -57,7 +57,7 @@ "phpunit/phpunit": "^10.5", "psalm/plugin-phpunit": "^0.18.4", "swoole/ide-helper": "^5.0.3", - "vimeo/psalm": "^5.12" + "vimeo/psalm": "^5.19" }, "suggest": { "ext-inotify": "To use inotify based file watcher. Required for hot code reloading.", diff --git a/composer.lock b/composer.lock index ad7039e..076db64 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "c3bf5b27506b6a8f85c15411fdf2a73a", + "content-hash": "1761d04d2bd4f19d5d46ea78ffeb5f53", "packages": [ { "name": "dflydev/fig-cookies", @@ -5281,16 +5281,16 @@ }, { "name": "vimeo/psalm", - "version": "5.12.0", + "version": "5.19.0", "source": { "type": "git", "url": "https://github.com/vimeo/psalm.git", - "reference": "f90118cdeacd0088e7215e64c0c99ceca819e176" + "reference": "06b71be009a6bd6d81b9811855d6629b9fe90e1b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vimeo/psalm/zipball/f90118cdeacd0088e7215e64c0c99ceca819e176", - "reference": "f90118cdeacd0088e7215e64c0c99ceca819e176", + "url": "https://api.github.com/repos/vimeo/psalm/zipball/06b71be009a6bd6d81b9811855d6629b9fe90e1b", + "reference": "06b71be009a6bd6d81b9811855d6629b9fe90e1b", "shasum": "" }, "require": { @@ -5309,14 +5309,17 @@ "ext-tokenizer": "*", "felixfbecker/advanced-json-rpc": "^3.1", "felixfbecker/language-server-protocol": "^1.5.2", - "fidry/cpu-core-counter": "^0.4.1 || ^0.5.1", + "fidry/cpu-core-counter": "^0.4.1 || ^0.5.1 || ^1.0.0", "netresearch/jsonmapper": "^1.0 || ^2.0 || ^3.0 || ^4.0", - "nikic/php-parser": "^4.14", - "php": "^7.4 || ~8.0.0 || ~8.1.0 || ~8.2.0", + "nikic/php-parser": "^4.16", + "php": "^7.4 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0", "sebastian/diff": "^4.0 || ^5.0", "spatie/array-to-xml": "^2.17.0 || ^3.0", - "symfony/console": "^4.1.6 || ^5.0 || ^6.0", - "symfony/filesystem": "^5.4 || ^6.0" + "symfony/console": "^4.1.6 || ^5.0 || ^6.0 || ^7.0", + "symfony/filesystem": "^5.4 || ^6.0 || ^7.0" + }, + "conflict": { + "nikic/php-parser": "4.17.0" }, "provide": { "psalm/psalm": "self.version" @@ -5335,7 +5338,7 @@ "psalm/plugin-phpunit": "^0.18", "slevomat/coding-standard": "^8.4", "squizlabs/php_codesniffer": "^3.6", - "symfony/process": "^4.4 || ^5.0 || ^6.0" + "symfony/process": "^4.4 || ^5.0 || ^6.0 || ^7.0" }, "suggest": { "ext-curl": "In order to send data to shepherd", @@ -5348,7 +5351,7 @@ "psalm-refactor", "psalter" ], - "type": "library", + "type": "project", "extra": { "branch-alias": { "dev-master": "5.x-dev", @@ -5380,10 +5383,11 @@ "static analysis" ], "support": { + "docs": "https://psalm.dev/docs", "issues": "https://github.com/vimeo/psalm/issues", - "source": "https://github.com/vimeo/psalm/tree/5.12.0" + "source": "https://github.com/vimeo/psalm" }, - "time": "2023-05-22T21:19:03+00:00" + "time": "2024-01-09T21:02:43+00:00" }, { "name": "webimpress/coding-standard", diff --git a/psalm-baseline.xml b/psalm-baseline.xml index 8ae4793..244f725 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -1,5 +1,5 @@ - + $cacheControlDirectives[$regex] @@ -26,14 +26,6 @@ InvalidConfigException - - - $paths - - - ]]> - - PROTOCOLS = [ @@ -90,11 +82,17 @@ + + $regexp + $cacheControlDirectives + + $regexp + $etagDirectives @@ -118,6 +116,16 @@ stream_filter_append + + + $regexp + + + + + $regex + + asString diff --git a/test/HttpServerFactoryTest.php b/test/HttpServerFactoryTest.php index f1e43a6..32e8681 100644 --- a/test/HttpServerFactoryTest.php +++ b/test/HttpServerFactoryTest.php @@ -20,7 +20,6 @@ use Swoole\Process; use Swoole\Runtime as SwooleRuntime; use Throwable; -use Webmozart\Assert\Assert; use function array_merge; use function defined; @@ -341,13 +340,11 @@ public function testFactoryCanEnableCoroutines(): void $i = 0; go(static function () use (&$i): void { - Assert::integer($i); usleep(1000); ++$i; SwooleEvent::exit(); }); go(function () use (&$i): void { - Assert::integer($i); ++$i; $this->assertEquals(1, $i); }); diff --git a/test/StaticResourceHandler/GzipMiddlewareTest.php b/test/StaticResourceHandler/GzipMiddlewareTest.php index 17e06d3..c9217e1 100644 --- a/test/StaticResourceHandler/GzipMiddlewareTest.php +++ b/test/StaticResourceHandler/GzipMiddlewareTest.php @@ -161,7 +161,6 @@ public function testResponseContentCallbackEmitsExpectedHeadersAndCompressesCont string|array $value, bool $format = true ) use (&$actualHeaderCalls): bool { - /** @psalm-var array $actualHeaderCalls */ $actualHeaderCalls[] = [$key, $value, $format]; return true; }); diff --git a/test/StaticResourceHandler/StaticResourceResponseTest.php b/test/StaticResourceHandler/StaticResourceResponseTest.php index 7cdc77b..765293d 100644 --- a/test/StaticResourceHandler/StaticResourceResponseTest.php +++ b/test/StaticResourceHandler/StaticResourceResponseTest.php @@ -35,7 +35,6 @@ public function testSendSwooleResponsePopulatesStatusAndHeadersAndCallsContentCa string|array $value, bool $format = true ) use (&$actualHeaderCalls): bool { - /** @psalm-var array $actualHeaderCalls */ $actualHeaderCalls[] = [$key, $value, $format]; return true; }); @@ -78,7 +77,6 @@ public function testSendSwooleResponseSkipsSendingContentWhenContentDisabled(): string|array $value, bool $format = true ) use (&$actualHeaderCalls): bool { - /** @psalm-var array $actualHeaderCalls */ $actualHeaderCalls[] = [$key, $value, $format]; return true; }); diff --git a/test/SwooleEmitterTest.php b/test/SwooleEmitterTest.php index 23873a6..99a0f68 100644 --- a/test/SwooleEmitterTest.php +++ b/test/SwooleEmitterTest.php @@ -86,7 +86,6 @@ public function testMultipleHeaders(): void string $key, string|array $value ) use (&$actualHeaderCalls): bool { - /** @psalm-var array $actualHeaderCalls */ $actualHeaderCalls[] = [$key, $value]; return true; }); @@ -152,7 +151,6 @@ public function testMultipleSetCookieHeaders(): void bool $httponly = false, string $samesite = '' ) use (&$actualCookieCalls): bool { - /** @psalm-var array $actualCookieCalls */ $actualCookieCalls[] = [$name, $value, $expires, $path, $domain, $secure, $httponly, $samesite]; return true; });