Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[MonologBridge] Fix debug processor datetime type#34601

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
nicolas-grekas merged 1 commit intosymfony:3.4frommRoca:monolog_bridge_debug_datetime
Dec 10, 2019
Merged

[MonologBridge] Fix debug processor datetime type#34601

nicolas-grekas merged 1 commit intosymfony:3.4frommRoca:monolog_bridge_debug_datetime
Dec 10, 2019

Conversation

@mRoca
Copy link
Contributor

@mRocamRoca commentedNov 25, 2019
edited
Loading

QA
Branch?3.4
Bug fix?yes
New feature?no
Deprecations?no
Ticketsn/a
LicenseMIT
Doc PRn/a

This PR fixes an eventualCall to a member function getTimestamp() on string if any Processor transforms thedatetime value, and uses the same record conditions as in theConsoleFormatter

Copy link
Member

@nicolas-grekasnicolas-grekas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Could you please add a test case? Not that this should be for branch 3.4, where the bug is apparently.

@nicolas-grekasnicolas-grekas added this to the3.4 milestoneNov 25, 2019
@mRocamRoca changed the base branch from5.0 to3.4November 25, 2019 16:15
@mRoca
Copy link
ContributorAuthor

Target branch is now 3.4, and tests have been added.

The bug is still present in theDebugHandler, which have been deprecated in 3.2, then deleted in 4.0. Should I fix it and add tests ?

return [
[array_merge($record, ['datetime' =>new \DateTime('2019-01-01T00:01:00+00:00')]),1546300860],
[array_merge($record, ['datetime' =>'2019-01-01T00:01:00+00:00']),1546300860],
[array_merge($record, ['datetime' =>'foo']),false],
Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

What should the timestamp field contain ifdatetime is not a valid value ? As the DebugProcessor is not called before other processors, the data can be corrupted.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

the original value could be the best

@nicolas-grekas
Copy link
Member

nicolas-grekas commentedNov 25, 2019
edited
Loading

The bug is still present in the DebugHandler

let's fix it then, branch 4.3 because 4.2 is not maintained anymore

What should the timestamp field contain if datetime is not a valid value ?

I don't know, this looks good enough to me.

@nicolas-grekas
Copy link
Member

Thank you@mRoca.

nicolas-grekas added a commit that referenced this pull requestDec 10, 2019
This PR was merged into the 3.4 branch.Discussion----------[MonologBridge] Fix debug processor datetime type| Q             | A| ------------- | ---| Branch?       | 3.4| Bug fix?      | yes| New feature?  | no| Deprecations? | no| Tickets       |n/a| License       | MIT| Doc PR        | n/aThis PR fixes an eventual `Call to a member function getTimestamp() on string` if any Processor transforms the `datetime` value, and uses the same record conditions as in the [ConsoleFormatter](https://github.com/symfony/monolog-bridge/blob/master/Formatter/ConsoleFormatter.php#L118 )Commits-------ffe3f10 [MonologBridge] Fix debug processor datetime type
@nicolas-grekasnicolas-grekas merged commitffe3f10 intosymfony:3.4Dec 10, 2019
@mRocamRoca deleted the monolog_bridge_debug_datetime branchDecember 10, 2019 12:19
This was referencedDec 19, 2019
This was referencedJan 21, 2020
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

+1 more reviewer

@Arman-HosseiniArman-HosseiniArman-Hosseini approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

3.4

Development

Successfully merging this pull request may close these issues.

4 participants

@mRoca@nicolas-grekas@Arman-Hosseini@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp