Skip to content

Некорректное содержание links метода /api/v5/orders/{externalId} #238

Closed

Description

@khvan-innokenty

В массиве links нет информации по связанным заказам.
Все поля содержат null.
Возможно, order.id должен быть типа int, а не SerializedEntityOrder.

array:1 [▼
  0 => RetailCrm\Api\Model\Entity\Orders\OrderLink {#2203 ▼
    +comment: null
    +order: array:3 [▼
      "id" => RetailCrm\Api\Model\Entity\Delivery\SerializedEntityOrder {#1826 ▼
        +id: null
        +externalId: null
        +number: null
        +applyRound: null
      }
      "number" => RetailCrm\Api\Model\Entity\Delivery\SerializedEntityOrder {#3143 ▼
        +id: null
        +externalId: null
        +number: null
        +applyRound: null
      }
      "externalId" => RetailCrm\Api\Model\Entity\Delivery\SerializedEntityOrder {#2572 ▼
        +id: null
        +externalId: null
        +number: null
        +applyRound: null
      }
    ]
    +createdAt: DateTime @1768145092 {#3128 ▼
      date: 2026-01-11 18:24:52.0 Europe/Moscow (+03:00)
    }
  }
]

Activity

  1. uryvskiy-dima commented on Apr 23, 2026

    @uryvskiy-dima
    Contributor

    Спасибо за репорт. Проблема подтверждена.

    В OrderLink::$order была некорректная JMS-аннотация: поле описано как LinkedOrder, но для десериализации был указан тип array<SerializedEntityOrder>. Из-за этого links[].order разбирался как массив, а id, number и externalId превращались в отдельные пустые объекты.

    Подготовлен фикс: тип заменен на RetailCrm\Api\Model\Entity\Orders\LinkedOrder.

    PR: #242

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions