Skip to content

Commit bb9a5a7

Browse files
authored
Merge pull request #839 from patchlevel/fix-extension-doctrine-cipher-key-store
2 parents e0b996d + 9895622 commit bb9a5a7

2 files changed

Lines changed: 2 additions & 26 deletions

File tree

phpstan-baseline.neon

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -18,34 +18,10 @@ parameters:
1818
count: 1
1919
path: src/Cryptography/DoctrineCipherKeyStore.php
2020

21-
-
22-
message: '#^Offset ''crypto_iv'' does not exist on array\{id\: non\-empty\-string, subject_id\: non\-empty\-string, crypto_key\: non\-empty\-string, crypto_method\: non\-empty\-string, created_at\: non\-empty\-string\}\.$#'
23-
identifier: offsetAccess.notFound
24-
count: 1
25-
path: src/Cryptography/ExtensionDoctrineCipherKeyStore.php
26-
27-
-
28-
message: '#^Parameter \#1 \$string of function base64_decode expects string, mixed given\.$#'
29-
identifier: argument.type
30-
count: 1
31-
path: src/Cryptography/ExtensionDoctrineCipherKeyStore.php
32-
33-
-
34-
message: '#^Parameter \#2 \$subjectId of class Patchlevel\\Hydrator\\Extension\\Cryptography\\Cipher\\CipherKey constructor expects non\-empty\-string, string given\.$#'
35-
identifier: argument.type
36-
count: 1
37-
path: src/Cryptography/ExtensionDoctrineCipherKeyStore.php
38-
3921
-
4022
message: '#^Parameter \#3 \$key of class Patchlevel\\Hydrator\\Extension\\Cryptography\\Cipher\\CipherKey constructor expects non\-empty\-string, string given\.$#'
4123
identifier: argument.type
42-
count: 1
43-
path: src/Cryptography/ExtensionDoctrineCipherKeyStore.php
44-
45-
-
46-
message: '#^Parameter \#4 \$method of class Patchlevel\\Hydrator\\Extension\\Cryptography\\Cipher\\CipherKey constructor expects non\-empty\-string, string given\.$#'
47-
identifier: argument.type
48-
count: 1
24+
count: 2
4925
path: src/Cryptography/ExtensionDoctrineCipherKeyStore.php
5026

5127
-

src/Cryptography/ExtensionDoctrineCipherKeyStore.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@ public function currentKeyFor(string $subjectId): CipherKey
7272

7373
return new CipherKey(
7474
$result['id'],
75+
$result['subject_id'],
7576
base64_decode($result['crypto_key']),
7677
$result['crypto_method'],
77-
base64_decode($result['crypto_iv']),
7878
$this->dateTimeType->convertToPHPValue($result['created_at'], $this->connection->getDatabasePlatform()),
7979
);
8080
}

0 commit comments

Comments
 (0)