-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Debug a Mapper | ||
|
||
AutoMapper provides 2 ways to debug what's going on with a mapper when using the Symfony bundle: | ||
|
||
## The `debug:mapper` Command | ||
|
||
The `debug:mapper` command will display the mapping information for a specific mapper. | ||
This can be useful to understand how AutoMapper is mapping your objects and why some properties are not mapped. | ||
|
||
```bash | ||
php bin/console debug:mapper User UserDTO | ||
``` | ||
|
||
![Profiler](../images/debug-cli.png) | ||
|
||
## Using the symfony profiler | ||
|
||
AutoMapper provides a panel in the Symfony profiler that will display the mapping information for each request. | ||
Please note that this only display Mapper that has been generated during the request, if you have a mapper that was not | ||
generated during the request it will not be displayed. | ||
|
||
You can find the panel in the Symfony profiler under the `AutoMapper` tab. | ||
|
||
![Profiler](../images/debug-profiler-1.png) | ||
![Profiler](../images/debug-profiler-2.png) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.