-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[ObjectMapper] CS fixes #60031
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
[ObjectMapper] CS fixes #60031
Conversation
OskarStark
commented
Mar 24, 2025
Q | A |
---|---|
Branch? | 7.3 |
Bug fix? | no |
New feature? | no |
Deprecations? | no |
Issues | -- |
License | MIT |
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.
After Jérôme's comment
b35693e
to
e2d9c52
Compare
@@ -100,7 +100,7 @@ public function testHasNothingToMapTo() | |||
{ | |||
$this->expectException(MappingException::class); | |||
$this->expectExceptionMessage('Mapping target not found for source "class@anonymous".'); | |||
(new ObjectMapper())->map(new class () {}); | |||
(new ObjectMapper())->map(new class {}); |
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->expectException(MappingTransformException::class); | ||
$this->expectExceptionMessage('Cannot map "stdClass" to a non-object target of type "string".'); | ||
|
||
$u = new \stdClass; | ||
$u = new \stdClass(); |
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->expectException(MappingException::class); | ||
$this->expectExceptionMessage(sprintf('Expected the mapped object to be an instance of "%s" but got "stdClass".', ClassWithoutTarget::class)); | ||
$this->expectExceptionMessage(\sprintf('Expected the mapped object to be an instance of "%s" but got "stdClass".', ClassWithoutTarget::class)); |
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.
There should also be a CS fixer for this
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.
There is native_function_invocation
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.
Thanks, didn't found it on the go
cc @nicolas-grekas and @fabpot regarding the CS settings |
Thank you @OskarStark. |