-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
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
fix: mapPrivatePropertiesAndMethod should not be mandatory #9
Conversation
e1dce7d
to
1e62341
Compare
1e62341
to
90357df
Compare
@@ -87,7 +87,7 @@ public function getPropertiesMapping(MapperMetadataInterface $mapperMetadata): a | |||
$this->getMaxDepth($mapperMetadata->getSource(), $property), | |||
$this->isIgnoredProperty($mapperMetadata->getSource(), $property), | |||
$this->isIgnoredProperty($mapperMetadata->getTarget(), $property), | |||
PropertyReadInfo::VISIBILITY_PUBLIC === $this->readInfoExtractor->getReadInfo($mapperMetadata->getSource(), $property)?->getVisibility() ?? true, | |||
PropertyReadInfo::VISIBILITY_PUBLIC === ($this->readInfoExtractor->getReadInfo($mapperMetadata->getSource(), $property)?->getVisibility() ?? PropertyReadInfo::VISIBILITY_PUBLIC), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤭
this would have been detected by phpstan 😇
@@ -229,7 +229,8 @@ private function buildPropertyMapping(): void | |||
null, | |||
new CallbackTransformer($property), | |||
$property, | |||
false | |||
false, | |||
isPublic: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because we're in presence of custom mapping, I think we should consider it as public, other wise PropertyMapping::shouldIgnoreProperty()
will return true
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, a quick note in CHANGELOG ?
90357df
to
6c7d1d2
Compare
mapPrivatePropertiesAndMethod
machanism was buggy, this is now fixed