Skip to content

Commit 56b1fbf

Browse files
committed
move cryptography into extension namespace
1 parent 2ee7bcf commit 56b1fbf

56 files changed

Lines changed: 285 additions & 229 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

phpstan-baseline.neon

Lines changed: 44 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
parameters:
22
ignoreErrors:
33
-
4-
message: '#^Method Patchlevel\\Hydrator\\Cryptography\\Cipher\\OpensslCipher\:\:encrypt\(\) should return non\-empty\-string but returns string\.$#'
4+
message: '#^Method Patchlevel\\Hydrator\\Extension\\Cryptography\\Cipher\\OpensslCipher\:\:encrypt\(\) should return non\-empty\-string but returns string\.$#'
55
identifier: return.type
66
count: 1
7-
path: src/Cryptography/Cipher/OpensslCipher.php
7+
path: src/Extension/Cryptography/Cipher/OpensslCipher.php
88

99
-
10-
message: '#^Parameter \#1 \$key of class Patchlevel\\Hydrator\\Cryptography\\Cipher\\CipherKey constructor expects non\-empty\-string, string given\.$#'
10+
message: '#^Parameter \#1 \$key of class Patchlevel\\Hydrator\\Extension\\Cryptography\\Cipher\\CipherKey constructor expects non\-empty\-string, string given\.$#'
1111
identifier: argument.type
1212
count: 1
13-
path: src/Cryptography/Cipher/OpensslCipherKeyFactory.php
13+
path: src/Extension/Cryptography/Cipher/OpensslCipherKeyFactory.php
1414

1515
-
16-
message: '#^Parameter \#3 \$iv of class Patchlevel\\Hydrator\\Cryptography\\Cipher\\CipherKey constructor expects non\-empty\-string, string given\.$#'
16+
message: '#^Parameter \#3 \$iv of class Patchlevel\\Hydrator\\Extension\\Cryptography\\Cipher\\CipherKey constructor expects non\-empty\-string, string given\.$#'
1717
identifier: argument.type
1818
count: 1
19-
path: src/Cryptography/Cipher/OpensslCipherKeyFactory.php
19+
path: src/Extension/Cryptography/Cipher/OpensslCipherKeyFactory.php
2020

2121
-
2222
message: '#^Method Patchlevel\\Hydrator\\Guesser\\BuiltInGuesser\:\:guess\(\) has parameter \$type with generic class Symfony\\Component\\TypeInfo\\Type\\ObjectType but does not specify its types\: T$#'
@@ -91,10 +91,46 @@ parameters:
9191
path: src/Normalizer/ObjectNormalizer.php
9292

9393
-
94-
message: '#^Property Patchlevel\\Hydrator\\Tests\\Unit\\Fixture\\ChildWithSensitiveDataWithIdentifierDto\:\:\$email is never read, only written\.$#'
94+
message: '#^Call to method clear\(\) on an unknown class Patchlevel\\Hydrator\\Cryptography\\Store\\InMemoryCipherKeyStore\.$#'
95+
identifier: class.notFound
96+
count: 1
97+
path: tests/Benchmark/HydratorWithCryptographyBench.php
98+
99+
-
100+
message: '#^Call to static method createWithOpenssl\(\) on an unknown class Patchlevel\\Hydrator\\Cryptography\\BaseCryptographer\.$#'
101+
identifier: class.notFound
102+
count: 1
103+
path: tests/Benchmark/HydratorWithCryptographyBench.php
104+
105+
-
106+
message: '#^Instantiated class Patchlevel\\Hydrator\\Cryptography\\CryptographyExtension not found\.$#'
107+
identifier: class.notFound
108+
count: 1
109+
path: tests/Benchmark/HydratorWithCryptographyBench.php
110+
111+
-
112+
message: '#^Instantiated class Patchlevel\\Hydrator\\Cryptography\\Store\\InMemoryCipherKeyStore not found\.$#'
113+
identifier: class.notFound
114+
count: 1
115+
path: tests/Benchmark/HydratorWithCryptographyBench.php
116+
117+
-
118+
message: '#^Parameter \#1 \$extension of method Patchlevel\\Hydrator\\HydratorBuilder\:\:useExtension\(\) expects Patchlevel\\Hydrator\\Extension, Patchlevel\\Hydrator\\Cryptography\\CryptographyExtension given\.$#'
119+
identifier: argument.type
120+
count: 1
121+
path: tests/Benchmark/HydratorWithCryptographyBench.php
122+
123+
-
124+
message: '#^Property Patchlevel\\Hydrator\\Tests\\Benchmark\\HydratorWithCryptographyBench\:\:\$store has unknown class Patchlevel\\Hydrator\\Cryptography\\Store\\InMemoryCipherKeyStore as its type\.$#'
125+
identifier: class.notFound
126+
count: 1
127+
path: tests/Benchmark/HydratorWithCryptographyBench.php
128+
129+
-
130+
message: '#^Property Patchlevel\\Hydrator\\Tests\\Unit\\Extension\\Cryptography\\Fixture\\ChildWithSensitiveDataWithIdentifierDto\:\:\$email is never read, only written\.$#'
95131
identifier: property.onlyWritten
96132
count: 1
97-
path: tests/Unit/Fixture/ChildWithSensitiveDataWithIdentifierDto.php
133+
path: tests/Unit/Extension/Cryptography/Fixture/ChildWithSensitiveDataWithIdentifierDto.php
98134

99135
-
100136
message: '#^Property Patchlevel\\Hydrator\\Tests\\Unit\\Fixture\\IdNormalizer\:\:\$idClass \(class\-string\<Patchlevel\\Hydrator\\Tests\\Unit\\Fixture\\Id\>\|null\) does not accept string\.$#'

src/Attribute/DataSubjectId.php renamed to src/Extension/Cryptography/Attribute/DataSubjectId.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
declare(strict_types=1);
44

5-
namespace Patchlevel\Hydrator\Attribute;
5+
namespace Patchlevel\Hydrator\Extension\Cryptography\Attribute;
66

77
use Attribute;
88

src/Attribute/SensitiveData.php renamed to src/Extension/Cryptography/Attribute/SensitiveData.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
declare(strict_types=1);
44

5-
namespace Patchlevel\Hydrator\Attribute;
5+
namespace Patchlevel\Hydrator\Extension\Cryptography\Attribute;
66

77
use Attribute;
88
use InvalidArgumentException;

src/Cryptography/BaseCryptographer.php renamed to src/Extension/Cryptography/BaseCryptographer.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22

33
declare(strict_types=1);
44

5-
namespace Patchlevel\Hydrator\Cryptography;
5+
namespace Patchlevel\Hydrator\Extension\Cryptography;
66

7-
use Patchlevel\Hydrator\Cryptography\Cipher\Cipher;
8-
use Patchlevel\Hydrator\Cryptography\Cipher\CipherKey;
9-
use Patchlevel\Hydrator\Cryptography\Cipher\CipherKeyFactory;
10-
use Patchlevel\Hydrator\Cryptography\Cipher\DecryptionFailed;
11-
use Patchlevel\Hydrator\Cryptography\Cipher\EncryptionFailed;
12-
use Patchlevel\Hydrator\Cryptography\Cipher\OpensslCipher;
13-
use Patchlevel\Hydrator\Cryptography\Cipher\OpensslCipherKeyFactory;
14-
use Patchlevel\Hydrator\Cryptography\Store\CipherKeyNotExists;
15-
use Patchlevel\Hydrator\Cryptography\Store\CipherKeyStore;
7+
use Patchlevel\Hydrator\Extension\Cryptography\Cipher\Cipher;
8+
use Patchlevel\Hydrator\Extension\Cryptography\Cipher\CipherKey;
9+
use Patchlevel\Hydrator\Extension\Cryptography\Cipher\CipherKeyFactory;
10+
use Patchlevel\Hydrator\Extension\Cryptography\Cipher\DecryptionFailed;
11+
use Patchlevel\Hydrator\Extension\Cryptography\Cipher\EncryptionFailed;
12+
use Patchlevel\Hydrator\Extension\Cryptography\Cipher\OpensslCipher;
13+
use Patchlevel\Hydrator\Extension\Cryptography\Cipher\OpensslCipherKeyFactory;
14+
use Patchlevel\Hydrator\Extension\Cryptography\Store\CipherKeyNotExists;
15+
use Patchlevel\Hydrator\Extension\Cryptography\Store\CipherKeyStore;
1616

1717
use function array_key_exists;
1818
use function is_array;

src/Cryptography/Cipher/Cipher.php renamed to src/Extension/Cryptography/Cipher/Cipher.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
declare(strict_types=1);
44

5-
namespace Patchlevel\Hydrator\Cryptography\Cipher;
5+
namespace Patchlevel\Hydrator\Extension\Cryptography\Cipher;
66

77
interface Cipher
88
{

src/Cryptography/Cipher/CipherKey.php renamed to src/Extension/Cryptography/Cipher/CipherKey.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
declare(strict_types=1);
44

5-
namespace Patchlevel\Hydrator\Cryptography\Cipher;
5+
namespace Patchlevel\Hydrator\Extension\Cryptography\Cipher;
66

77
final class CipherKey
88
{

src/Cryptography/Cipher/CipherKeyFactory.php renamed to src/Extension/Cryptography/Cipher/CipherKeyFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
declare(strict_types=1);
44

5-
namespace Patchlevel\Hydrator\Cryptography\Cipher;
5+
namespace Patchlevel\Hydrator\Extension\Cryptography\Cipher;
66

77
interface CipherKeyFactory
88
{

src/Cryptography/Cipher/CreateCipherKeyFailed.php renamed to src/Extension/Cryptography/Cipher/CreateCipherKeyFailed.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
declare(strict_types=1);
44

5-
namespace Patchlevel\Hydrator\Cryptography\Cipher;
5+
namespace Patchlevel\Hydrator\Extension\Cryptography\Cipher;
66

77
use Patchlevel\Hydrator\HydratorException;
88
use RuntimeException;

src/Cryptography/Cipher/DecryptionFailed.php renamed to src/Extension/Cryptography/Cipher/DecryptionFailed.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
declare(strict_types=1);
44

5-
namespace Patchlevel\Hydrator\Cryptography\Cipher;
5+
namespace Patchlevel\Hydrator\Extension\Cryptography\Cipher;
66

77
use Patchlevel\Hydrator\HydratorException;
88
use RuntimeException;

src/Cryptography/Cipher/EncryptionFailed.php renamed to src/Extension/Cryptography/Cipher/EncryptionFailed.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
declare(strict_types=1);
44

5-
namespace Patchlevel\Hydrator\Cryptography\Cipher;
5+
namespace Patchlevel\Hydrator\Extension\Cryptography\Cipher;
66

77
use Patchlevel\Hydrator\HydratorException;
88
use RuntimeException;

0 commit comments

Comments
 (0)