CARVIEW |
Select Language
HTTP/2 200
date: Mon, 25 Aug 2025 00:24:00 GMT
content-type: text/html; charset=utf-8
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, X-Requested-With,Accept-Encoding, Accept, X-Requested-With
x-repository-download: git clone https://github.com/symfony/symfony.git
etag: W/"48588016ff097f5d56d01ce86000ab14"
cache-control: max-age=0, private, must-revalidate
strict-transport-security: max-age=31536000; includeSubdomains; preload
x-frame-options: deny
x-content-type-options: nosniff
x-xss-protection: 0
referrer-policy: no-referrer-when-downgrade
content-security-policy: default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com *.rel.tunnels.api.visualstudio.com wss://*.rel.tunnels.api.visualstudio.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com proxy.individual.githubcopilot.com proxy.business.githubcopilot.com proxy.enterprise.githubcopilot.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com wss://alive-staging.github.com api.githubcopilot.com api.individual.githubcopilot.com api.business.githubcopilot.com api.enterprise.githubcopilot.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: blob: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com private-avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com release-assets.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com copilotprodattachments.blob.core.windows.net/github-production-copilot-attachments/ github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/
server: github.com
content-encoding: gzip
accept-ranges: bytes
set-cookie: _gh_sess=oU5vcCfbFzQn%2B1kHKoSKVL%2BehhdUwFSJdSJyU0SqBxJCDMz%2FzpmGeKU6mrVsPF8Xbl54mdlap12C%2BINwTKjk8TCb09JVJbFdq2krwQM8qRMCw3UG6ar8gLEcft8udHt2iyLrc8fU8MmCgsBB5rRD8Go9BSV12zp6xAfq8sx7IZvUzVTQuoVHmD85N00ZFfjUb6xxIiQEb%2FXZ2X6xDGVQ6xmgJmvF%2F2%2BqyzOv276idR1xaz4JVtmkm%2FGwh1DEqbBBNuzG3l5kf82AfAL1vLjZ4g%3D%3D--FPghEeBYk8TROYpi--BpbzLp8AmucFc5r1Wp36ng%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.1936521538.1756081439; Path=/; Domain=github.com; Expires=Tue, 25 Aug 2026 00:23:59 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Tue, 25 Aug 2026 00:23:59 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: C2D4:305394:12D411B:18D71D1:68ABAD1F
feature #61145 [ObjectMapper] Add `ObjectMapperAwareInterface` to set… · symfony/symfony@5db13d5 · GitHub
Copy file name to clipboardExpand all lines: src/Symfony/Component/ObjectMapper/CHANGELOG.md
Copy file name to clipboardExpand all lines: src/Symfony/Component/ObjectMapper/ObjectMapper.php
Copy file name to clipboard
Copy file name to clipboardExpand all lines: src/Symfony/Component/ObjectMapper/Tests/ObjectMapperTest.php
Skip to content
Navigation Menu
{{ message }}
-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Commit 5db13d5
committed
feature #61145 [ObjectMapper] Add
This PR was merged into the 7.4 branch.
Discussion
----------
[ObjectMapper] Add `ObjectMapperAwareInterface` to set the owning object mapper instance
| Q | A
| ------------- | ---
| Branch? | 7.4
| Feature? | yes
| Issues | Fix #61119
| License | MIT
Because the Object Mapper calls itself and we don't offer the possibility to change the owning object mapper, its hard to change the behavior on embedded objects (you could with a transform callable but it is redundant and adds lots of complexity).
With this change the ObjectMapper can use a decorated instance and we can easily provide a way to make things like #61119 work. Inside API Platform we have the same issue where we want to re-use values that have been previously mapped to existing entities, we don't want to create new classes. This is achievable with decorating the ObjectMapper but works on relations only if the called mapper inside the mapper is configurable.
Let me know how I should write the DI in the FrameworkBundle for this as it'd be nice if it worked with decoration pattern without user interactions.
Commits
-------
d6ff8d1 [ObjectMapper] allow owning ObjectMapper objectObjectMapperAwareInterface
to set the owning object mapper instance (soyuka)File tree
Expand file treeCollapse file tree
4 files changed
+83
-2
lines changedFilter options
- src/Symfony/Component/ObjectMapper
- Tests
Expand file treeCollapse file tree
4 files changed
+83
-2
lines changedsrc/Symfony/Component/ObjectMapper/CHANGELOG.md
Copy file name to clipboardExpand all lines: src/Symfony/Component/ObjectMapper/CHANGELOG.md+5Lines changed: 5 additions & 0 deletions
- Display the source diff
- Display the rich diff
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 | 2 |
| |
3 | 3 |
| |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
4 | 9 |
| |
5 | 10 |
| |
6 | 11 |
| |
|
src/Symfony/Component/ObjectMapper/ObjectMapper.php
Copy file name to clipboardExpand all lines: src/Symfony/Component/ObjectMapper/ObjectMapper.php+11-2Lines changed: 11 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
28 | 28 |
| |
29 | 29 |
| |
30 | 30 |
| |
31 |
| - | |
| 31 | + | |
32 | 32 |
| |
33 | 33 |
| |
34 | 34 |
| |
| |||
40 | 40 |
| |
41 | 41 |
| |
42 | 42 |
| |
| 43 | + | |
43 | 44 |
| |
44 | 45 |
| |
45 | 46 |
| |
| |||
211 | 212 |
| |
212 | 213 |
| |
213 | 214 |
| |
214 |
| - | |
| 215 | + | |
215 | 216 |
| |
216 | 217 |
| |
217 | 218 |
| |
| |||
327 | 328 |
| |
328 | 329 |
| |
329 | 330 |
| |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
330 | 339 |
|
src/Symfony/Component/ObjectMapper/ObjectMapperAwareInterface.php
Copy file name to clipboard+25Lines changed: 25 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + |
src/Symfony/Component/ObjectMapper/Tests/ObjectMapperTest.php
Copy file name to clipboardExpand all lines: src/Symfony/Component/ObjectMapper/Tests/ObjectMapperTest.php+42Lines changed: 42 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
368 | 368 |
| |
369 | 369 |
| |
370 | 370 |
| |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
371 | 413 |
|
You can’t perform that action at this time.
0 commit comments