Skip to content

Commit

Permalink
prepare release
Browse files Browse the repository at this point in the history
  • Loading branch information
spiralbot committed Dec 11, 2024
1 parent 3af9c4f commit 222ab3e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"require": {
"php": ">=8.1",
"ext-json": "*",
"spiral/core": "^3.15",
"spiral/core": "^3.14.8",
"defuse/php-encryption": "^2.2"
},
"require-dev": {
Expand Down
2 changes: 1 addition & 1 deletion src/EncrypterFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public function getEncrypter(): EncrypterInterface
return new Encrypter($this->getKey());
}

public function createInjection(\ReflectionClass $class, string $context = null): EncrypterInterface
public function createInjection(\ReflectionClass $class, ?string $context = null): EncrypterInterface
{
return $this->getEncrypter();
}
Expand Down
4 changes: 3 additions & 1 deletion tests/EncrypterFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
use Spiral\Encrypter\EncryptionInterface;
use Spiral\Encrypter\Exception\EncrypterException;

#[\PHPUnit\Framework\Attributes\CoversClass(\Spiral\Encrypter\EncrypterFactory::class)]
class EncrypterFactoryTest extends TestCase
{
public function testInjection(): void
Expand Down Expand Up @@ -80,6 +79,9 @@ public function testExceptionKey(): void
echo $factory->getKey();
}

/**
* @covers \Spiral\Encrypter\EncrypterFactory::generateKey
*/
public function testGenerateKey(): void
{
$key = Key::CreateNewRandomKey()->saveToAsciiSafeString();
Expand Down
4 changes: 3 additions & 1 deletion tests/EncrypterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
use Spiral\Encrypter\Exception\DecryptException;
use Spiral\Encrypter\Exception\EncrypterException;

#[\PHPUnit\Framework\Attributes\CoversClass(\Spiral\Encrypter\Encrypter::class)]
class EncrypterTest extends TestCase
{
public function testImmutable(): void
Expand All @@ -24,6 +23,9 @@ public function testImmutable(): void
$this->assertEquals($keyB, $new->getKey());
}

/**
* @covers \Spiral\Encrypter\Encrypter::encrypt
*/
public function testEncryption(): void
{
$encrypter = new Encrypter(Key::CreateNewRandomKey()->saveToAsciiSafeString());
Expand Down

0 comments on commit 222ab3e

Please sign in to comment.