You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
functiongetData() {
yield1;
yield2;
}
...$classToSerialize = newClassToSerialize($this->getData()); // Save getData()'s result to inner iterable-typed property// annotated with * @Serializer\Type("array<int>")
Steps required to reproduce the problem
$data = $serializer->serialize($classToSerialize, ...);
Expected Result
$data
contains array[1, 2]
, Generator was converted to arrayActual Result
$data
contains empty array, Generator was not converted to arrayWhat do you think of auto converting generators to arrays when serializing?
The text was updated successfully, but these errors were encountered: