Skip to content

[HttpKernel] Avoid memory leaks cache attribute, profiler listener #60934

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

Open
wants to merge 3 commits into
base: 7.4
Choose a base branch
from

Conversation

andrew-demb
Copy link
Contributor

@andrew-demb andrew-demb commented Jun 28, 2025

Q A
Branch? 7.4
Bug fix? no
New feature? yes
Deprecations? no
Issues
License MIT

For the current moment, if the onKernelTerminate / onKernelResponse methods won't be called, the listener's state won't be reset between requests.

Please let me know if this should be considered as a new feature - to retarget PR to the 7.3 branch

Similar to PR #60933

@carsonbot carsonbot added this to the 6.4 milestone Jun 28, 2025
@andrew-demb andrew-demb changed the title [HttpKernel.] Avoid memory leaks cache attribute listener [HttpKernel] Avoid memory leaks cache attribute listener Jun 28, 2025
@andrew-demb andrew-demb force-pushed the avoid-memory-leaks-cache-attribute branch from a3367a0 to 5996644 Compare June 28, 2025 00:51
@andrew-demb
Copy link
Contributor Author

CI failure is unrelated

There was 1 failure:

1) Symfony\Bundle\FrameworkBundle\Tests\Functional\CachePoolsTest::testCachePools
Failed asserting that true is false.

@nicolas-grekas
Copy link
Member

Introducing an new method means this is a new feature, it should target 7.4

@@ -4,6 +4,7 @@ CHANGELOG
6.4
---

* `Symfony\Component\HttpKernel\EventListener\CacheAttributeListener` is now resettable to prevent memory leaks
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* `Symfony\Component\HttpKernel\EventListener\CacheAttributeListener` is now resettable to prevent memory leaks
* `Symfony\Component\HttpKernel\EventListener\CacheAttributeListener` is now resettable to prevent memory leaks

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed, thanks

@andrew-demb andrew-demb force-pushed the avoid-memory-leaks-cache-attribute branch from 5996644 to 2e51bdc Compare June 28, 2025 11:50
@andrew-demb andrew-demb changed the base branch from 6.4 to 7.4 June 28, 2025 11:51
@andrew-demb andrew-demb force-pushed the avoid-memory-leaks-cache-attribute branch from 2e51bdc to a7c7c72 Compare June 28, 2025 11:53
@andrew-demb andrew-demb changed the title [HttpKernel] Avoid memory leaks cache attribute listener [HttpKernel] Avoid memory leaks cache attribute, profiler listener Jun 28, 2025
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.

4 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy