Skip to content

Commit

Permalink
Update vimeo/psalm requirement from ^4.18 to ^5.6 (#169)
Browse files Browse the repository at this point in the history
Co-authored-by: Sergei Predvoditelev <sergei@predvoditelev.ru>
  • Loading branch information
dependabot[bot] and vjik committed Feb 11, 2023
1 parent 194c370 commit dd77b6a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion composer.json
Expand Up @@ -41,7 +41,7 @@
"rector/rector": "^0.15.3",
"roave/infection-static-analysis-plugin": "^1.16",
"spatie/phpunit-watcher": "^1.23",
"vimeo/psalm": "^4.18",
"vimeo/psalm": "^4.30|^5.6",
"yiisoft/test-support": "^3.0"
},
"autoload": {
Expand Down
2 changes: 2 additions & 0 deletions psalm.xml
@@ -1,6 +1,8 @@
<?xml version="1.0"?>
<psalm
errorLevel="1"
findUnusedBaselineEntry="true"
findUnusedCode="false"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
Expand Down
5 changes: 2 additions & 3 deletions src/Command/Serve.php
Expand Up @@ -37,13 +37,12 @@ final class Serve extends Command
protected static $defaultDescription = 'Runs PHP built-in web server';

/**
* @param string|null $appRootPath
* @param array|null $options
* @psalm-param array{
* address?:non-empty-string,
* port?:non-empty-string,
* docroot?:string,
* router?:string
* router?:string,
* workers?:int|string
* } $options
*/
public function __construct(private ?string $appRootPath = null, ?array $options = [])
Expand Down
6 changes: 4 additions & 2 deletions src/CommandLoader.php
Expand Up @@ -34,7 +34,7 @@ final class CommandLoader implements CommandLoaderInterface
/**
* @param array $commandMap An array with command names as keys and service ids as values.
*
* @psalm-param array<string, class-string> $commandMap
* @psalm-param array<string, class-string<Command>> $commandMap
*/
public function __construct(private ContainerInterface $container, array $commandMap)
{
Expand Down Expand Up @@ -98,7 +98,7 @@ private function getCommandInstance(string $name): Command
}

/**
* @psalm-param array<string, class-string> $commandMap
* @psalm-param array<string, class-string<Command>> $commandMap
*/
private function setCommandMap(array $commandMap): void
{
Expand All @@ -114,6 +114,8 @@ private function setCommandMap(array $commandMap): void
array_shift($aliases);
}

/** @var string[] $aliases Fix for psalm. See {@link https://github.com/vimeo/psalm/issues/9261}. */

$this->validateAliases($aliases);

$primaryName = array_shift($aliases);
Expand Down

0 comments on commit dd77b6a

Please sign in to comment.