mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-12-12 09:52:20 +00:00
Update packages and various code for laravel 9
This commit is contained in:
@@ -27,7 +27,6 @@ use Crypt;
|
||||
use FireflyIII\Models\Attachment;
|
||||
use Illuminate\Console\Command;
|
||||
use Illuminate\Contracts\Encryption\DecryptException;
|
||||
use Illuminate\Contracts\Filesystem\FileNotFoundException;
|
||||
use Log;
|
||||
use Storage;
|
||||
|
||||
@@ -62,10 +61,9 @@ class ScanAttachments extends Command
|
||||
/** @var Attachment $attachment */
|
||||
foreach ($attachments as $attachment) {
|
||||
$fileName = $attachment->fileName();
|
||||
try {
|
||||
$encryptedContent = $disk->get($fileName);
|
||||
} catch (FileNotFoundException $e) {
|
||||
$this->error(sprintf('Could not find data for attachment #%d: %s', $attachment->id, $e->getMessage()));
|
||||
if (null === $encryptedContent) {
|
||||
Log::error(sprintf('No content for attachment #%d under filename "%s"', $attachment->id, $fileName));
|
||||
continue;
|
||||
}
|
||||
try {
|
||||
|
||||
@@ -25,7 +25,6 @@ declare(strict_types=1);
|
||||
namespace FireflyIII\Console\Commands;
|
||||
|
||||
use Illuminate\Console\Command;
|
||||
use Illuminate\Contracts\Filesystem\FileNotFoundException;
|
||||
use Log;
|
||||
use Storage;
|
||||
|
||||
@@ -51,7 +50,6 @@ class VerifySecurityAlerts extends Command
|
||||
* Execute the console command.
|
||||
*
|
||||
* @return int
|
||||
* @throws FileNotFoundException
|
||||
*/
|
||||
public function handle(): int
|
||||
{
|
||||
|
||||
@@ -28,7 +28,6 @@ use FireflyIII\Models\Attachment;
|
||||
use FireflyIII\Models\PiggyBank;
|
||||
use Illuminate\Contracts\Encryption\DecryptException;
|
||||
use Illuminate\Contracts\Encryption\EncryptException;
|
||||
use Illuminate\Contracts\Filesystem\FileNotFoundException;
|
||||
use Illuminate\Contracts\Filesystem\Filesystem;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Support\Collection;
|
||||
@@ -77,15 +76,10 @@ class AttachmentHelper implements AttachmentHelperInterface
|
||||
*/
|
||||
public function getAttachmentContent(Attachment $attachment): string
|
||||
{
|
||||
$encryptedData = '';
|
||||
try {
|
||||
$encryptedData = $this->uploadDisk->get(sprintf('at-%d.data', $attachment->id));
|
||||
} catch (FileNotFoundException $e) {
|
||||
Log::error($e->getMessage());
|
||||
}
|
||||
$encryptedData = (string) $this->uploadDisk->get(sprintf('at-%d.data', $attachment->id));
|
||||
try {
|
||||
$unencryptedData = Crypt::decrypt($encryptedData); // verified
|
||||
} catch (DecryptException | FileNotFoundException $e) {
|
||||
} catch (DecryptException $e) {
|
||||
Log::error(sprintf('Could not decrypt data of attachment #%d: %s', $attachment->id, $e->getMessage()));
|
||||
$unencryptedData = $encryptedData;
|
||||
}
|
||||
|
||||
@@ -31,7 +31,6 @@ use FireflyIII\Models\Attachment;
|
||||
use FireflyIII\Models\Note;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Contracts\Encryption\DecryptException;
|
||||
use Illuminate\Contracts\Filesystem\FileNotFoundException;
|
||||
use Illuminate\Support\Collection;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Log;
|
||||
@@ -101,12 +100,7 @@ class AttachmentRepository implements AttachmentRepositoryInterface
|
||||
$unencryptedContent = '';
|
||||
|
||||
if ($disk->exists($file)) {
|
||||
$encryptedContent = '';
|
||||
try {
|
||||
$encryptedContent = $disk->get($file);
|
||||
} catch (FileNotFoundException $e) {
|
||||
Log::error($e->getMessage());
|
||||
}
|
||||
$encryptedContent = (string) $disk->get($file);
|
||||
|
||||
try {
|
||||
$unencryptedContent = Crypt::decrypt($encryptedContent); // verified
|
||||
|
||||
@@ -97,12 +97,16 @@
|
||||
"league/commonmark": "2.*",
|
||||
"league/csv": "^9.7",
|
||||
"league/fractal": "0.*",
|
||||
"nunomaduro/collision": "^6.1",
|
||||
"pragmarx/google2fa": "^8.0",
|
||||
"predis/predis": "^1.1",
|
||||
"psr/log": "<3",
|
||||
"ramsey/uuid": "^4.2",
|
||||
"rcrowe/twigbridge": "^0.14",
|
||||
"spatie/data-transfer-object": "^3.7"
|
||||
"spatie/data-transfer-object": "^3.7",
|
||||
"spatie/laravel-ignition": "^1.0",
|
||||
"symfony/http-client": "^6.0",
|
||||
"symfony/mailgun-mailer": "^6.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"barryvdh/laravel-debugbar": "^3.6",
|
||||
|
||||
937
composer.lock
generated
937
composer.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -33,21 +33,7 @@ return [
|
||||
|
|
||||
*/
|
||||
|
||||
'default' => env('FILESYSTEM_DRIVER', 'local'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Cloud Filesystem Disk
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Many applications store files both locally and in the cloud. For this
|
||||
| reason, you may specify a default "cloud" driver here. This driver
|
||||
| will be bound as the Cloud disk implementation in the container.
|
||||
|
|
||||
*/
|
||||
|
||||
'cloud' => env('FILESYSTEM_CLOUD', 's3'),
|
||||
|
||||
'default' => env('FILESYSTEM_DISK', 'local'),
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Filesystem Disks
|
||||
|
||||
Reference in New Issue
Block a user