This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
symfony/src/Symfony/Component
Fabien Potencier 8335537446 feature #27202 [Messenger] Improve the profiler panel (ogizanagi)
This PR was squashed before being merged into the 4.1 branch (closes #27202).

Discussion
----------

[Messenger] Improve the profiler panel

| Q             | A
| ------------- | ---
| Branch?       | 4.1 <!-- see below -->
| Bug fix?      | no
| New feature?  | yes <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | N/A   <!-- #26597  issue number(s), if any -->
| License       | MIT
| Doc PR        | N/A

This is an attempt to enhance the profiler panel a bit.

**with the following messages dispatched:**

```php
$queryBus->dispatch(Envelope::wrap(new GetGreetingsQuery('Hello you'))
    ->with(new JustAFriendOfMine())
    ->with(new AndHisPlusO̶n̶e̶Eleven())
);
$commandBus->dispatch(new SendGiftCommand());
$queryBus->dispatch(new GetGreetingsQuery('Exterminate!'));
```

## Before

<img width="1084" alt="screenshot 2018-05-12 a 13 57 57" src="https://user-images.githubusercontent.com/2211145/39957055-8a0f009e-55ec-11e8-9d8e-bf79aad4b420.PNG">

🐛calls order are wrong here, fixed in this PR

## After

### collapsed

<!-- <img width="1083" alt="screenshot 2018-05-10 a 23 51 07" src="https://user-images.githubusercontent.com/2211145/39896093-19a8c7ee-54ad-11e8-8dcb-4e165ffd2eae.PNG">-->

<img width="1085" alt="screenshot 2018-05-12 a 13 18 35" src="https://user-images.githubusercontent.com/2211145/39956802-9d4c38a2-55e7-11e8-8425-ad090c0871b6.PNG">
<img width="1085" alt="screenshot 2018-05-12 a 13 26 44" src="https://user-images.githubusercontent.com/2211145/39956827-25d9e426-55e8-11e8-9116-160603649f33.PNG">

📝 _When loading the page, all messages details are collapsed by default but the first one per tab._

### expanded

<!-- <img width="1083" alt="screenshot 2018-05-10 a 23 13 39" src="https://user-images.githubusercontent.com/2211145/39894779-42c9cc9a-54a8-11e8-9529-6292481536d4.PNG"> -->

<img width="1086" alt="screenshot 2018-05-12 a 13 49 42" src="https://user-images.githubusercontent.com/2211145/39956981-639fc3d6-55eb-11e8-9224-a48f591db3da.PNG">

### live

<!-- ![mai-10-2018 23-16-17](https://user-images.githubusercontent.com/2211145/39894789-4b8fa138-54a8-11e8-986c-fccf6cd0234f.gif) -->

![mai-12-2018 13-55-40](https://user-images.githubusercontent.com/2211145/39957041-37f17b34-55ec-11e8-8569-a733a104bf82.gif)

### toolbar (with exceptions)

<img width="284" alt="screenshot 2018-05-10 a 23 18 32" src="https://user-images.githubusercontent.com/2211145/39895011-0467f2a0-54a9-11e8-9d78-25461cf71c41.PNG">

## Notes

- Table headers are clickable, so you can jump directly to the message class in the code
- Reversing headers/rows allows to have a wider space for dumps and allows to add more entries in the future. This is an issue we already have with the Validator panel (when there is both an invalid value as object and a constraint violation dumped) which I'd like to revamp soon.
- ~~I wonder if we should keep the dispatched messages in call order, or if we can segregate by bus (using tabs?).~~
- ~~we could add a left container listing messages classes only, allowing to show details of a single message dispatched on a right container (similar to what the Form panel does). I'll probably suggest the same for the Validator panel.~~

Commits
-------

3d19578297 [Messenger] Improve the profiler panel
2018-05-13 08:14:37 +02:00
..
Asset Mark ExceptionInterfaces throwable 2018-03-30 17:58:13 +02:00
BrowserKit [BroserKit] Enable passthrew header information on submit 2018-04-06 12:52:03 +02:00
Cache Merge branch '4.0' 2018-05-07 09:14:12 +02:00
Config Merge branch '4.0' 2018-05-01 16:02:13 -07:00
Console [DI] Minor performance tweak in PriorityTaggedServiceTrait 2018-05-03 17:03:52 -07:00
CssSelector Mark ExceptionInterfaces throwable 2018-03-30 17:58:13 +02:00
Debug Merge branch '4.0' 2018-04-30 10:00:18 -07:00
DependencyInjection [DI] Minor performance tweak in PriorityTaggedServiceTrait 2018-05-03 17:03:52 -07:00
DomCrawler Merge branch '4.0' 2018-05-01 16:02:13 -07:00
Dotenv Mark ExceptionInterfaces throwable 2018-03-30 17:58:13 +02:00
EventDispatcher Merge branch '4.0' 2018-04-06 09:35:57 +02:00
ExpressionLanguage Remove symfony/polyfill-ctype where not needed 2018-05-01 15:50:35 -07:00
Filesystem Merge branch '4.0' 2018-05-01 16:02:13 -07:00
Finder Merge branch '2.7' into 2.8 2018-04-04 15:38:31 +02:00
Form Merge branch '4.0' 2018-05-07 09:14:12 +02:00
HttpFoundation Merge branch '4.0' 2018-05-07 09:14:12 +02:00
HttpKernel bumped Symfony version to 4.1.0 2018-05-07 18:01:53 +02:00
Inflector Merge branch '4.0' 2018-05-01 16:02:13 -07:00
Intl Remove symfony/polyfill-ctype where not needed 2018-05-01 15:50:35 -07:00
Ldap Allow adding and removing values to/from multi-valued attributes 2018-04-04 19:25:31 +02:00
Lock Merge branch '4.0' 2018-04-29 18:07:08 -07:00
Messenger feature #27202 [Messenger] Improve the profiler panel (ogizanagi) 2018-05-13 08:14:37 +02:00
OptionsResolver Mark ExceptionInterfaces throwable 2018-03-30 17:58:13 +02:00
Process Merge branch '4.0' 2018-04-03 07:25:17 +02:00
PropertyAccess Merge branch '2.7' into 2.8 2018-05-01 15:52:40 -07:00
PropertyInfo Merge branch '4.0' 2018-04-26 18:12:45 +02:00
Routing [DI][Routing] Allow invokable objects to be used as PHP-DSL loaders 2018-04-27 11:21:35 +02:00
Security Remove symfony/polyfill-ctype where not needed 2018-05-01 15:50:35 -07:00
Serializer feature #27105 [Serializer] Add ->hasCacheableSupportsMethod() to CacheableSupportsMethodInterface (nicolas-grekas) 2018-05-03 08:19:37 +02:00
Stopwatch Merge branch '4.0' 2018-02-19 17:51:42 +01:00
Templating Merge branch '4.0' 2018-05-01 16:02:13 -07:00
Translation Merge branch '4.0' 2018-05-07 09:14:12 +02:00
Validator Merge branch '4.0' 2018-05-07 09:14:12 +02:00
VarDumper minor #26866 [VarDumper] Add controller & project dir to HTML output (ogizanagi) 2018-04-29 09:56:09 +02:00
WebLink Merge branch '4.0' 2018-01-03 08:38:11 +01:00
Workflow [Workflow] Added DefinitionBuilder::setMetadataStore(). 2018-05-11 18:37:20 +02:00
Yaml Merge branch '4.0' 2018-05-07 09:14:12 +02:00