fix: resolve RedisCache array offset error and improve discovery diagnostics

- Fix RedisCache driver to handle MGET failures gracefully with fallback
- Add comprehensive discovery context comparison debug tools
- Identify root cause: WEB context discovery missing 166 items vs CLI
- WEB context missing RequestFactory class entirely (52 vs 69 commands)
- Improved exception handling with detailed binding diagnostics
This commit is contained in:
2025-09-12 20:05:18 +02:00
parent 8040d3e7a5
commit e30753ba0e
46990 changed files with 10789682 additions and 89639 deletions

View File

@@ -75,7 +75,7 @@ final readonly class ImageApiController
'file_size' => $image->fileSize,
'hash' => $image->hash,
'variants' => array_map(fn ($variant) => [
'type' => $variant->type,
'type' => $variant->variantType,
'width' => $variant->width,
'height' => $variant->height,
'path' => $variant->path,

View File

@@ -12,6 +12,7 @@ use App\Framework\Http\Exception\NotFound;
use App\Framework\Http\HttpRequest;
use App\Framework\Http\Method;
use App\Framework\Http\Responses\JsonResponse;
use App\Framework\Http\Status;
final readonly class ImageSlotController
{
@@ -47,7 +48,7 @@ final readonly class ImageSlotController
public function getSlot(int $id): JsonResponse
{
try {
$slot = $this->slotRepository->findByIdWithImage($id);
$slot = $this->slotRepository->findByIdWithImage((string) $id);
} catch (\RuntimeException $e) {
throw NotFound::create(
ErrorCode::ENTITY_NOT_FOUND,
@@ -74,7 +75,7 @@ final readonly class ImageSlotController
public function assignImage(int $id, HttpRequest $request): JsonResponse
{
try {
$slot = $this->slotRepository->findById($id);
$slot = $this->slotRepository->findById((string) $id);
} catch (\RuntimeException $e) {
throw NotFound::create(
ErrorCode::ENTITY_NOT_FOUND,
@@ -86,7 +87,7 @@ final readonly class ImageSlotController
$imageUlid = $data['image_ulid'] ?? null;
if (! $imageUlid) {
return new JsonResponse(['error' => 'image_ulid is required'], 400);
return new JsonResponse(['error' => 'image_ulid is required'], Status::BAD_REQUEST);
}
$image = $this->imageRepository->findByUlid($imageUlid);
@@ -99,7 +100,7 @@ final readonly class ImageSlotController
}
// Update slot with new image
$this->slotRepository->updateImageId($id, $imageUlid);
$this->slotRepository->updateImageId((string) $id, $imageUlid);
return new JsonResponse([
'success' => true,
@@ -115,7 +116,7 @@ final readonly class ImageSlotController
public function removeImage(int $id): JsonResponse
{
try {
$slot = $this->slotRepository->findById($id);
$slot = $this->slotRepository->findById((string) $id);
} catch (\RuntimeException $e) {
throw NotFound::create(
ErrorCode::ENTITY_NOT_FOUND,
@@ -124,7 +125,7 @@ final readonly class ImageSlotController
}
// Remove image from slot
$this->slotRepository->updateImageId($id, '');
$this->slotRepository->updateImageId((string) $id, '');
return new JsonResponse([
'success' => true,