Skip to content

Add ReleaseMemoryMiddleware. Add option to clear memory before or after processing message#7

Merged
ZhukV merged 4 commits intoFiveLab:masterfrom
alextcyinnovation:add-release-memory-middleware
May 20, 2025
Merged

Add ReleaseMemoryMiddleware. Add option to clear memory before or after processing message#7
ZhukV merged 4 commits intoFiveLab:masterfrom
alextcyinnovation:add-release-memory-middleware

Conversation

@alextcyinnovation
Copy link
Copy Markdown
Contributor

No description provided.

{
public function __construct(
private ResetInterface $servicesResetter,
private bool $clearBeforeMessage = false,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

$clearBeforeHandle

public function __construct(
private ResetInterface $servicesResetter,
private bool $clearBeforeMessage = false,
private ?EntityManagerInterface $entityManager = null,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

\Doctrine\Bundle\DoctrineBundle\Registry::reset

This service already has reset method and contain kernel.reset tag

class ReleaseMemoryMiddlewareTest extends TestCase
{
private ResetInterface $servicesResetter;
protected function setUp(): void
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

One empty before methods

@ZhukV ZhukV merged commit 42880fc into FiveLab:master May 20, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants