contributte / contributte/apitte
EntityAdapter, private properties, doctrine entity
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 64
- Forks
- 37
- Avg merge
- 12m
- Merged PRs (30d)
- 1
Description
Nějak nemůžu přijít na to jak namapovat entity k serializaci do openapi a k deserializaci.
Koukám do zdroje EntityAdapter a vidím, že prochází pouze public properties, ale co entity
class CompletionPackageEntity
{
public function __construct(
/** @var array<string,WeightProduktVariantaEntity> */
protected array $weightOfItems,
/**
* @var ArrayOfCompletionPackageDokladEntity|null
*/
protected ?ArrayOfCompletionPackageDokladEntity $data,
/** @var array<string,string> */
protected array $EANtoProduktVarianta,
protected bool $iAmNotOwner
)
{
}
public function addWeightOfItem(string $weight): void
{
$this->weightOfItems[] = $weight;
}
přesto, že existují public gettery tak je pro EntityAdapter tato entity prázdná.
Má to nějaké řešení? Jak jsou třeba mapovány doctrine entity? Musím EntityAdapter přepsat? Existuje už nějaký přepsaný?
díky za rady
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue points to EntityAdapter and a CompletionPackageEntity with protected properties and public getters. Start by reading EntityAdapter's property traversal and compare it with the Doctrine entity mapping question. Done should define and verify a supported way to serialize and deserialize this entity instead of producing an empty result.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100