We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
in our doctrine entities we have remnants after the previous programmer who left fields with names as mobil(instead of mobile), comId and many other.
now we want to expose these entities via an api, but need to present the fields under different names e.g.: mobil -> mobile comId -> businessId, etc
refactoring is not really an option i would like to pursue, since we also serialize some objects to json and that complicates things
so i had an idea about an alias annotation
/** @JMS\Alias(value='mobile') */ private $mobil;
what do you think?
The text was updated successfully, but these errors were encountered:
You can use the @VirtualProperty annotation
@VirtualProperty
/** @JMS\VirtualProperty */ public function getMobile() { return $this->mobil; }
Sorry, something went wrong.
SerializedName does this already
/** @JMS\SerializedName('mobile') */ private $mobil;
No branches or pull requests
in our doctrine entities we have remnants after the previous programmer who left fields with names as mobil(instead of mobile), comId and many other.
now we want to expose these entities via an api, but need to present the fields under different names
e.g.: mobil -> mobile
comId -> businessId, etc
refactoring is not really an option i would like to pursue, since we also serialize some objects to json and that complicates things
so i had an idea about an alias annotation
what do you think?
The text was updated successfully, but these errors were encountered: