From c74595705df18b73f46889811211a0c042fc361f Mon Sep 17 00:00:00 2001 From: Florian Moser Date: Tue, 19 Nov 2024 09:12:54 +0100 Subject: [PATCH 1/2] feat: Log to file --- config/packages/monolog.yaml | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/config/packages/monolog.yaml b/config/packages/monolog.yaml index 9db7d8a7..1c4833f6 100644 --- a/config/packages/monolog.yaml +++ b/config/packages/monolog.yaml @@ -44,19 +44,15 @@ when@prod: type: fingers_crossed action_level: error handler: nested - excluded_http_codes: [404, 405] + excluded_http_codes: [ 404, 405 ] buffer_size: 50 # How many messages should be saved? Prevent memory leaks nested: type: stream - path: php://stderr + path: "%kernel.logs_dir%/%kernel.environment%.log" level: debug formatter: monolog.formatter.json console: type: console process_psr_3_messages: false - channels: ["!event", "!doctrine"] - deprecation: - type: stream - channels: [deprecation] - path: php://stderr - formatter: monolog.formatter.json + channels: [ "!event", "!doctrine" ] + From 6ad78f89c395153cc3d0b2bd2bc62d68c382728c Mon Sep 17 00:00:00 2001 From: Florian Moser Date: Tue, 19 Nov 2024 09:17:04 +0100 Subject: [PATCH 2/2] fix: Handle other orientations --- src/Service/Image/GdService.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Service/Image/GdService.php b/src/Service/Image/GdService.php index cac6af24..4d81d141 100644 --- a/src/Service/Image/GdService.php +++ b/src/Service/Image/GdService.php @@ -110,9 +110,11 @@ private function getQuarterRotation(string $sourcePath): int $exif = exif_read_data($sourcePath); if (!empty($exif['Orientation'])) { return match ($exif['Orientation']) { + 1 => 0, 3 => 2, 6 => 3, 8 => 1, + default => 0, // cannot handle non-90% rotations }; } }