Profiler enable/disable has illogical behavior
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 22
- Forks
- 11
- Avg merge
- 53m
- Merged PRs (30d)
- 1
Description
$profiler = new Profiler($logger);
$profiler->enable(false);
Expects that profiler is disabled, but it returns new disabled profiler instead, and old one still stays enabled.
I suggest to make enabled property mutable and switch it's value using method ->enable() instead of cloning profiler
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Search the repository for the Profiler class and its enable() method, then inspect how the current enabled state is handled. Done means calling enable(false) changes the existing profiler's behavior instead of returning a separate disabled instance; verify the behavior with the relevant tests or add coverage if none is mentioned.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- performance
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100