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

[Stopwatch] Add getLastPeriod method to StopwatchEvent #54855

Merged
merged 1 commit into from May 21, 2024

Conversation

hacfi
Copy link
Contributor

@hacfi hacfi commented May 7, 2024

Q A
Branch? 7.1
Bug fix? no
New feature? no
Deprecations? no
Issues -
License MIT

It's often useful to just get the last period (if you start and stop an event several times).

Example

https://github.com/doctrine/migrations/blob/3.7.x/lib/Doctrine/Migrations/Version/DbalExecutor.php#L167-L168

This adds a simple getLastPeriod method on the StopwatchEvent class.

@carsonbot
Copy link

It looks like you unchecked the "Allow edits from maintainer" box. That is fine, but please note that if you have multiple commits, you'll need to squash your commits into one before this can be merged. Or, you can check the "Allow edits from maintainers" box and the maintainer can squash for you.

Cheers!

Carsonbot

@OskarStark OskarStark changed the title [Stopwatch] Add getLastPeriod method to StopwatchEvent [Stopwatch] Add getLastPeriod method to StopwatchEvent May 7, 2024
Copy link
Member

@fabpot fabpot left a comment

Choose a reason for hiding this comment

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

For 7.2

@fabpot fabpot modified the milestones: 7.1, 7.2 May 11, 2024
@xabbuh
Copy link
Member

xabbuh commented May 13, 2024

the new method should also be documented in the changelog file of the Stopwatch component

@hacfi
Copy link
Contributor Author

hacfi commented May 13, 2024

@xabbuh Updated as requested! Anything else left to do?

@fabpot
Copy link
Member

fabpot commented May 21, 2024

Thank you @hacfi.

@fabpot fabpot merged commit 2ea870f into symfony:7.2 May 21, 2024
7 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants