Skip to content

fix(http-cache): purge parent collections in inheritance cases#7699

Closed
Griffon-Weglot wants to merge 1 commit intoapi-platform:mainfrom
Griffon-Weglot:fix/purge-parent-collections-inheritance
Closed

fix(http-cache): purge parent collections in inheritance cases#7699
Griffon-Weglot wants to merge 1 commit intoapi-platform:mainfrom
Griffon-Weglot:fix/purge-parent-collections-inheritance

Conversation

@Griffon-Weglot
Copy link

@Griffon-Weglot Griffon-Weglot commented Jan 26, 2026

Q A
Branch? 4.2
Tickets #7034
License MIT
Doc PR

#7042 with tests

// @phpstan-ignore-next-line
$em = method_exists($eventArgs, 'getObjectManager') ? $eventArgs->getObjectManager() : $eventArgs->getEntityManager();
$uow = $em->getUnitOfWork();
$this->em = method_exists($eventArgs, 'getObjectManager') ? $eventArgs->getObjectManager() : $eventArgs->getEntityManager();
Copy link
Member

Choose a reason for hiding this comment

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

Why do youeed to set this on the class instance?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think it's because code has changed since the original PR and some code was moved to the postFlush method which does not have access to the em (?)

Copy link
Contributor

Choose a reason for hiding this comment

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

See #7345 and #7353 @soyuka

I wonder if both the PR #7042 and the issue #7034 are closed by the fix #7353.

Anyway the initial fix is not doable anymore (cc @Griffon-Weglot)

}
}
}
}
Copy link
Member

Choose a reason for hiding this comment

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

I like this though

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.

3 participants

Comments