Skip to content

Commit

Permalink
Merge pull request #43 from ScaryDonetskiy/feat/update-predis
Browse files Browse the repository at this point in the history
Update Predis and phpstan versions
  • Loading branch information
Yozhef authored Jul 30, 2024
2 parents f347e71 + 2b644d3 commit 1fad99d
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 15 deletions.
2 changes: 1 addition & 1 deletion DependencyInjection/RedisExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class RedisExtension extends ConfigurableExtension
/**
* loadInternal.
*
* @param array[] $configs
* @param mixed[] $configs
* @param ContainerBuilder $container
*/
protected function loadInternal(array $configs, ContainerBuilder $container): void
Expand Down
5 changes: 4 additions & 1 deletion Redis/Factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ class Factory implements FactoryInterface
*/
public static function create(array $parameters = [], array $options = []): ClientInterface
{
return new static::$clientClass($parameters, $options);
/** @var ClientInterface $client */
$client = new static::$clientClass($parameters, $options);

return $client;
}
}
4 changes: 2 additions & 2 deletions Redis/FactoryInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ interface FactoryInterface
/**
* Creates single or aggregate connections from different types of arguments.
*
* @param array[] $parameters Connection parameters.
* @param array[] $options Client options.
* @param mixed[] $parameters Connection parameters.
* @param mixed[] $options Client options.
*
* @return ClientInterface
*/
Expand Down
8 changes: 4 additions & 4 deletions Tests/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ class Kernel
*/
public static function make(): Fixtures\app\AppKernel
{
if (null === static::$instance) {
static::$instance = new Fixtures\app\AppKernel('test', true);
if (null === self::$instance) {
self::$instance = new Fixtures\app\AppKernel('test', true);

static::$instance->boot();
self::$instance->boot();
}

return static::$instance;
return self::$instance;
}
}
4 changes: 2 additions & 2 deletions Tests/Redis/ClientTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public function testSingleConnection(): void
/**
* getClient.
*
* @param array[] $config
* @param mixed[] $config
*
* @return ClientInterface
*
Expand All @@ -82,7 +82,7 @@ private function getClient(array $config = []): ClientInterface
/**
* loadExtension.
*
* @param array[] $config
* @param mixed[] $config
*
* @return ContainerBuilder
*/
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,16 @@
},
"require": {
"php": "^7.2||^8.0",
"predis/predis": "~1.1",
"predis/predis": "~1.1||~2.2",
"symfony/framework-bundle": "^4.3||^5.0||^6.0||^7.0",
"symfony/yaml": "^4.3||^5.0||^6.0||^7.0"
},
"require-dev": {
"phpunit/phpunit": "^8.5||^9.0",
"symfony/phpunit-bridge": "^5.0",
"squizlabs/php_codesniffer": "^3.5",
"phpstan/phpstan": "^0.12",
"phpstan/phpstan-phpunit": "^0.12"
"phpstan/phpstan": "^1.11",
"phpstan/phpstan-phpunit": "^1.4"
},
"extra": {
"branch-alias": {
Expand Down
2 changes: 1 addition & 1 deletion phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ parameters:
count: 1
path: DependencyInjection/Configuration.php
-
message: '#^Comparison operation "<" between 60007 and 53000 is always false.$#'
message: '#^Comparison operation "<" between 70103 and 53000 is always false.$#'
count: 1
path: Tests/Fixtures/app/AppKernel.php
2 changes: 1 addition & 1 deletion phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ includes:
- phpstan-baseline.neon

parameters:
level: max
level: 8
paths:
- DependencyInjection/
- Redis/
Expand Down

0 comments on commit 1fad99d

Please sign in to comment.