File tree Expand file tree Collapse file tree 2 files changed +3
-8
lines changed Expand file tree Collapse file tree 2 files changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -189,13 +189,8 @@ public function postFlush()
189189 */
190190 private function scheduleForDeletion ($ object )
191191 {
192- $ identifierValue = $ this ->propertyAccessor ->getValue ($ object , $ this ->config ['identifier ' ]);
193- if ($ identifierValue && !is_scalar ($ identifierValue )) {
194- $ identifierValue = (string ) $ identifierValue ;
195- }
196-
197- if ($ identifierValue ) {
198- $ this ->scheduledForDeletion [] = $ identifierValue ;
192+ if ($ identifierValue = $ this ->propertyAccessor ->getValue ($ object , $ this ->config ['identifier ' ])) {
193+ $ this ->scheduledForDeletion [] = !is_scalar ($ identifierValue ) ? (string ) $ identifierValue : $ identifierValue ;
199194 }
200195 }
201196
Original file line number Diff line number Diff line change @@ -542,7 +542,7 @@ public function testIdentifierIsCastedToString()
542542 $ transformer = $ this ->getTransformer ();
543543 $ document = $ transformer ->transform ($ object , []);
544544
545- $ this ->assertSame ('string ' , gettype ( $ document ->getId () ));
545+ $ this ->assertSame ('00000000-0000-0000-0000-000000000000 ' , $ document ->getId ());
546546 }
547547
548548 /**
You can’t perform that action at this time.
0 commit comments