Skip to content

Commit be190c6

Browse files
committed
update dependencies
1 parent d5c9008 commit be190c6

File tree

5 files changed

+26
-15
lines changed

5 files changed

+26
-15
lines changed

composer.json

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,15 @@
4747
"amphp/postgres": "v1.4.*",
4848
"latitude/latitude": "v4.2.*",
4949
"psr/log": "v1.1.*",
50-
"doctrine/dbal": "v3.2.*",
51-
"symfony/dependency-injection": "v5.4.*",
50+
"doctrine/dbal": "v3.3.*",
51+
"symfony/dependency-injection": "v6.0.*",
5252
"amphp/file": "v2.0.*"
5353
},
5454
"require-dev": {
5555
"php-service-bus/code-style-config": "v5.1.*",
5656
"phpunit/phpunit": "v9.5.*",
57-
"vimeo/psalm": "v4.13.*",
58-
"phpstan/phpstan": "v1.2.*",
57+
"vimeo/psalm": "v4.19.*",
58+
"phpstan/phpstan": "v1.4.*",
5959
"boesing/psalm-plugin-stringf": "v1.1.*"
6060
},
6161
"prefer-stable": true,
@@ -70,6 +70,9 @@
7070
"pre-commit": "PHP_CS_FIXER_IGNORE_ENV=1 ./vendor/bin/php-cs-fixer fix --allow-risky=yes && ./vendor/bin/psalm --config=psalm.xml && ./vendor/bin/phpstan analyse src --level 9 && ./vendor/bin/phpunit --configuration phpunit.xml --verbose"
7171
},
7272
"config": {
73-
"optimize-autoloader": true
73+
"optimize-autoloader": true,
74+
"allow-plugins": {
75+
"composer/package-versions-deprecated": true
76+
}
7477
}
7578
}

phpstan.neon

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
11
parameters:
22
checkMissingIterableValueType: false
33
checkGenericClassInNonGenericObjectType: false
4-
ignoreErrors:
5-
- '#Cannot cast mixed to int#'
6-
- '#Access to .* ServiceBus\\Storage\\Sql\\Migration\\MigrationType(.*)#'

src/Sql/AmpPosgreSQL/functions.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ function adaptAmpThrowable(\Throwable $throwable): \Throwable
3030
$throwable instanceof QueryExecutionError &&
3131
\in_array((int) $throwable->getDiagnostics()['sqlstate'], [23503, 23505], true)
3232
) {
33-
/** @psalm-suppress RedundantCast */
3433
return new InternalExceptions\UniqueConstraintViolationCheckFailed(
3534
$throwable->getMessage(),
3635
(int) $throwable->getCode(),

src/Sql/Migration/Migration.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,22 @@ abstract protected function up(): void;
4848

4949
abstract protected function down(): void;
5050

51+
/**
52+
* @psalm-return array<array-key, non-empty-string>
53+
*/
54+
public function queries(): array
55+
{
56+
return $this->queries;
57+
}
58+
59+
/**
60+
* @psalm-return array<non-empty-string, array<array-key, string|int|float|null>>
61+
*/
62+
public function parameters(): array
63+
{
64+
return $this->params;
65+
}
66+
5167
/**
5268
* Close constructor
5369
*

src/Sql/Migration/SqlMigrationProcessor.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -125,13 +125,9 @@ function () use ($type): \Generator
125125

126126
invokeReflectionMethod($migration, \strtolower($type->name));
127127

128-
/** @psalm-var array<array-key, non-empty-string> $queries */
129-
$queries = readReflectionPropertyValue($migration, 'queries');
128+
$parameters = $migration->parameters();
130129

131-
/** @psalm-var array<non-empty-string, array<array-key, string|int|float|null>> $parameters */
132-
$parameters = readReflectionPropertyValue($migration, 'params');
133-
134-
foreach ($queries as $query)
130+
foreach ($migration->queries() as $query)
135131
{
136132
/** @psalm-var non-empty-string $queryParametersKey */
137133
$queryParametersKey = \sha1($query);

0 commit comments

Comments
 (0)