Skip to content

fix: Profiler: use $title as key in start() so it will correctly be unset in stop() (backport: 6.6.x)#14613

Merged
Nicolas Fortier (nfortier-shopware) merged 1 commit into6.6.xfrom
bugfix/profiler-start-stop-backport-6.6.x
Feb 16, 2026
Merged

fix: Profiler: use $title as key in start() so it will correctly be unset in stop() (backport: 6.6.x)#14613
Nicolas Fortier (nfortier-shopware) merged 1 commit into6.6.xfrom
bugfix/profiler-start-stop-backport-6.6.x

Conversation

@shopware-octo-sts-app
Copy link
Copy Markdown
Contributor

Backport: #14019


1. Why is this change necessary?

When using Profiler::start() and Profiler::stop() separately a LogicException will be thrown during Profiler::cleanup() as it thinks it still has an open trace. This happens because Profiler::start() stores the title as a value in $openTraces but Profiler::stop() tries to use the title as a key.

2. What does this change do, exactly?

Prevents a LogicException from occuring during shutdown when using Profiler start/stop separately

3. Describe each step to reproduce the issue or behaviour.

  1. Setup Stopwatch and/or Symfony profiler
  2. Use Profiler::start('test');
  3. Use Profiler::stop('test');
  4. Get LogicException with message "'test' has not been started"

4. Please link to the relevant issues (if any).

5. Checklist

  • I have written tests and verified that they fail without my change
  • I have updated developer-facing release notes if this change is relevant for external developers:
    • Add a short entry to RELEASE_INFO-6.<major>.md under “Upcoming” for informational changes, including the consequences of the change and how it affects external developers.
    • Add an UPGRADE section in UPGRADE-6.<next-major>.md for breaking changes (what/why/impact/how to adapt).
    • See the Documenting a Release Process for details.
  • I have written or adjusted the documentation according to my changes
  • This change has comments for package types, values, functions, and non-obvious lines of code
  • I have read the contribution requirements and fulfilled them

…nset in stop() (#14019)

Co-authored-by: Nicolas Fortier <[email protected]>
Co-authored-by: Nicolas Fortier <[email protected]>
@shopware-octo-sts-app shopware-octo-sts-app bot added component/core domain/framework Responsible for the framework-level code includes core, administration, storefront, and frontends external-contribution A PR contributed by a community member. labels Jan 29, 2026
@github-actions
Copy link
Copy Markdown

Warnings
⚠️ The Pull Request doesn't contain any changelog file

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 325068c4bc

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "Codex (@codex) review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "Codex (@codex) address that feedback".

Merged via the queue into 6.6.x with commit fcdb6e3 Feb 16, 2026
76 checks passed
@nfortier-shopware Nicolas Fortier (nfortier-shopware) deleted the bugfix/profiler-start-stop-backport-6.6.x branch February 16, 2026 16:34
@github-actions github-actions bot added this to the 6.7.8.0 milestone Feb 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component/core domain/framework Responsible for the framework-level code includes core, administration, storefront, and frontends external-contribution A PR contributed by a community member. milestone/6.7.8.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants