From f12be8958458d4abe3faa73ca0f0de8b4d329d91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Randy=20=C4=8Cupi=C4=87?= Date: Thu, 9 May 2024 14:51:12 +0200 Subject: [PATCH] Implicitly cast public ID to string on notifications --- bundle/Controller/Callback/Cloudinary/Notify.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/bundle/Controller/Callback/Cloudinary/Notify.php b/bundle/Controller/Callback/Cloudinary/Notify.php index b42b471c..556ccb1c 100644 --- a/bundle/Controller/Callback/Cloudinary/Notify.php +++ b/bundle/Controller/Callback/Cloudinary/Notify.php @@ -124,7 +124,7 @@ private function handleResourceUploaded(array $requestContent): void $cloudinaryRemoteId = new CloudinaryRemoteId( $requestContent['type'], $requestContent['resource_type'], - $requestContent['public_id'], + (string) $requestContent['public_id'], ); if ($this->gateway instanceof CacheableGatewayInterface) { @@ -162,7 +162,7 @@ private function handleResourceDeleted(array $requestContent): void $cloudinaryRemoteId = new CloudinaryRemoteId( $resourceData['type'], $resourceData['resource_type'], - $resourceData['public_id'], + (string) $resourceData['public_id'], ); $this->gateway->invalidateResourceCache($cloudinaryRemoteId); @@ -211,7 +211,7 @@ private function handleResourceRenamed(array $requestContent): void $cloudinaryRemoteId = new CloudinaryRemoteId( $apiResource['type'], $apiResource['resource_type'], - $apiResource['public_id'], + (string) $apiResource['public_id'], ); $resource @@ -227,7 +227,7 @@ private function handleResourceRenamed(array $requestContent): void new CloudinaryRemoteId( $apiResource['type'], $apiResource['resource_type'], - $requestContent['from_public_id'], + (string) $requestContent['from_public_id'], ), ); } @@ -244,7 +244,7 @@ private function handleTagsChanged(array $requestContent): void $cloudinaryRemoteId = new CloudinaryRemoteId( $resourceData['type'], $resourceData['resource_type'], - $resourceData['public_id'], + (string) $resourceData['public_id'], ); $this->gateway->invalidateResourceCache($cloudinaryRemoteId); @@ -279,7 +279,7 @@ private function handleContextChanged(array $requestContent): void $cloudinaryRemoteId = new CloudinaryRemoteId( $resourceData['type'], $resourceData['resource_type'], - $publicId, + (string) $publicId, ); $this->gateway->invalidateResourceCache($cloudinaryRemoteId);