Skip to content
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

[WebProfiler] Fix some design glitches #2907

Merged
merged 1 commit into from
Dec 18, 2011

Conversation

stloyd
Copy link
Contributor

@stloyd stloyd commented Dec 17, 2011

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #2867

@jalliot
Copy link
Contributor

jalliot commented Dec 17, 2011

Thanks @stloyd.
However it only fixes the second and third issues related in #2867. The filesystem provider bug is much more annoying!

@stloyd
Copy link
Contributor Author

stloyd commented Dec 17, 2011

@jalliot Did you cleaned profiler dir after update to latest master commit ? This is mentioned and kinda known BC break... I'm asking because I cannot reproduce this issue.

@jalliot
Copy link
Contributor

jalliot commented Dec 17, 2011

@stloyd It has nothing to do with your recent PR adding HTTP method as I had the bug even before that.
I've tested on a fresh Symfony (master) install (before and after the merge) and have the bug each time.
I thought maybe it was related to some of the bundles I installed but the bug occurs even in a freshly installed SE.

fabpot added a commit that referenced this pull request Dec 18, 2011
Commits
-------

d1fa8cc [WebProfiler] Fix some design glitches (closes #2867)

Discussion
----------

[WebProfiler] Fix some design glitches

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #2867

---------------------------------------------------------------------------

by jalliot at 2011/12/17 04:54:11 -0800

Thanks @stloyd.
However it only fixes the second and third issues related in #2867. The filesystem provider bug is much more annoying!

---------------------------------------------------------------------------

by stloyd at 2011/12/17 05:38:13 -0800

@jalliot Did you cleaned profiler dir after update to latest master commit ? This is mentioned and kinda known BC break... I'm asking because I cannot reproduce this issue.

---------------------------------------------------------------------------

by jalliot at 2011/12/17 08:17:21 -0800

@stloyd It has nothing to do with your recent PR adding HTTP method as I had the bug even before that.
I've tested on a fresh Symfony (master) install (before and after the merge) and have the bug each time.
I thought maybe it was related to some of the bundles I installed but the bug occurs even in a freshly installed SE.
@fabpot fabpot merged commit d1fa8cc into symfony:2.0 Dec 18, 2011
fabpot added a commit that referenced this pull request Aug 23, 2021
…(carlcasbolt)

This PR was merged into the 5.4 branch.

Discussion
----------

[HttpKernel] Fix timestamp_rfc3339 in LoggerDataCollector

Found that this was still needed for some log items to avoid an error in Profiler

| Q             | A
| ------------- | ---
| Branch?       | 5.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Ticket | Fixes #42622
| License       | MIT

Fix for the following error on Web Profiler when looking at error logs

```
[2021-08-17T10:30:06.093284+00:00] request.CRITICAL: Uncaught PHP Exception Twig\Error\RuntimeError: "An exception has been thrown during the rendering of a template ("Warning: Undefined array key "timestamp_rfc3339"")." at /app/vendor/symfony/web-profiler-bundle/Resources/views/Collector/logger.html.twig line 49 {"exception":"[object] (Twig\\Error\\RuntimeError(code: 0): An exception has been thrown during the rendering of a template (\"Warning: Undefined array key \"timestamp_rfc3339\"\"). at /app/vendor/symfony/web-profiler-bundle/Resources/views/Collector/logger.html.twig:49)\n[previous exception] [object] (ErrorException(code: 0): Warning: Undefined array key \"timestamp_rfc3339\" at /app/vendor/symfony/http-kernel/DataCollector/LoggerDataCollector.php:112)"} []
```

Found this issue on a new 5.4 project build today

Expected data shape is
```
array:7 [▼
  "timestamp" => Symfony\Component\VarDumper\Cloner\Data {#2810 ▶}
  "timestamp_rfc3339" => Symfony\Component\VarDumper\Cloner\Data {#2622 ▶}
  "message" => Symfony\Component\VarDumper\Cloner\Data {#2811 ▶}
  "priority" => Symfony\Component\VarDumper\Cloner\Data {#2812 ▶}
  "priorityName" => Symfony\Component\VarDumper\Cloner\Data {#2813 ▶}
  "context" => Symfony\Component\VarDumper\Cloner\Data {#2814 ▶}
  "channel" => Symfony\Component\VarDumper\Cloner\Data {#2815 ▶}
]
```

However I'm seeing this shape for `Please install the "intl" PHP extension for best performance.`
```
array:8 [▼
  "message" => Symfony\Component\VarDumper\Cloner\Data {#2905 ▶}
  "context" => Symfony\Component\VarDumper\Cloner\Data {#2717 ▶}
  "timestamp" => Symfony\Component\VarDumper\Cloner\Data {#2906 ▶}
  "priority" => Symfony\Component\VarDumper\Cloner\Data {#2907 ▶}
  "priorityName" => Symfony\Component\VarDumper\Cloner\Data {#2908 ▶}
  "channel" => Symfony\Component\VarDumper\Cloner\Data {#2909 ▶}
  "scream" => Symfony\Component\VarDumper\Cloner\Data {#2910 ▶}
  "errorCount" => Symfony\Component\VarDumper\Cloner\Data {#2911 ▶}
]
```
![image](https://user-images.githubusercontent.com/1097038/129744965-3cb18a81-5083-446d-af7e-d1209dde9eb5.png)

Commits
-------

967dee3 [HttpKernel] Fix timestamp_rfc3339 in LoggerDataCollector
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants