From 2eb45555cc66728cbc7f5068bb015d45bd76e465 Mon Sep 17 00:00:00 2001 From: Deleu Date: Fri, 12 Mar 2021 15:22:10 +0100 Subject: [PATCH 1/3] StringEncrypter interface for better DX --- .../Contracts/Encryption/StringEncrypter.php | 27 +++++++++++++++++++ src/Illuminate/Encryption/Encrypter.php | 3 ++- src/Illuminate/Foundation/Application.php | 2 +- 3 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 src/Illuminate/Contracts/Encryption/StringEncrypter.php diff --git a/src/Illuminate/Contracts/Encryption/StringEncrypter.php b/src/Illuminate/Contracts/Encryption/StringEncrypter.php new file mode 100644 index 000000000000..fe3ac3e92b55 --- /dev/null +++ b/src/Illuminate/Contracts/Encryption/StringEncrypter.php @@ -0,0 +1,27 @@ + [\Symfony\Component\Cache\Adapter\Psr16Adapter::class, \Symfony\Component\Cache\Adapter\AdapterInterface::class, \Psr\Cache\CacheItemPoolInterface::class], 'config' => [\Illuminate\Config\Repository::class, \Illuminate\Contracts\Config\Repository::class], 'cookie' => [\Illuminate\Cookie\CookieJar::class, \Illuminate\Contracts\Cookie\Factory::class, \Illuminate\Contracts\Cookie\QueueingFactory::class], - 'encrypter' => [\Illuminate\Encryption\Encrypter::class, \Illuminate\Contracts\Encryption\Encrypter::class], 'db' => [\Illuminate\Database\DatabaseManager::class, \Illuminate\Database\ConnectionResolverInterface::class], 'db.connection' => [\Illuminate\Database\Connection::class, \Illuminate\Database\ConnectionInterface::class], + 'encrypter' => [\Illuminate\Encryption\Encrypter::class, \Illuminate\Contracts\Encryption\Encrypter::class, \Illuminate\Contracts\Encryption\StringEncrypter::class], 'events' => [\Illuminate\Events\Dispatcher::class, \Illuminate\Contracts\Events\Dispatcher::class], 'files' => [\Illuminate\Filesystem\Filesystem::class], 'filesystem' => [\Illuminate\Filesystem\FilesystemManager::class, \Illuminate\Contracts\Filesystem\Factory::class], From ba803ff3951a983de444910b0a2a818a13f6bc9a Mon Sep 17 00:00:00 2001 From: Deleu Date: Fri, 12 Mar 2021 15:26:24 +0100 Subject: [PATCH 2/3] StyleCI --- src/Illuminate/Contracts/Encryption/StringEncrypter.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Illuminate/Contracts/Encryption/StringEncrypter.php b/src/Illuminate/Contracts/Encryption/StringEncrypter.php index fe3ac3e92b55..1e6938c29a16 100644 --- a/src/Illuminate/Contracts/Encryption/StringEncrypter.php +++ b/src/Illuminate/Contracts/Encryption/StringEncrypter.php @@ -4,7 +4,6 @@ interface StringEncrypter { - /** * Encrypt a string without serialization. * From 33a50380f7749239fddfedb07af80d52a4dd0c0d Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Fri, 12 Mar 2021 08:30:42 -0600 Subject: [PATCH 3/3] Update Encrypter.php --- src/Illuminate/Encryption/Encrypter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Illuminate/Encryption/Encrypter.php b/src/Illuminate/Encryption/Encrypter.php index b5fc508e0826..c0e5e50b8092 100755 --- a/src/Illuminate/Encryption/Encrypter.php +++ b/src/Illuminate/Encryption/Encrypter.php @@ -8,7 +8,7 @@ use Illuminate\Contracts\Encryption\StringEncrypter; use RuntimeException; -class Encrypter implements StringEncrypter, EncrypterContract +class Encrypter implements EncrypterContract, StringEncrypter { /** * The encryption key.