Skip to content

Commit ade8c36

Browse files
committed
Merge remote-tracking branch 'origin/8.3' into 8.4
2 parents 2ea75b9 + d9953aa commit ade8c36

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Neos.Flow/Classes/Package.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,11 @@ public function boot(Core\Bootstrap $bootstrap)
6767
$dispatcher = $bootstrap->getSignalSlotDispatcher();
6868

6969
$dispatcher->connect(Mvc\Dispatcher::class, 'afterControllerInvocation', function ($request) use ($bootstrap) {
70-
// No auto-persistence if there is no PersistenceManager registered
70+
// No auto-persistence if there is no PersistenceManager loaded
71+
// This signal will not be fired at compile time, as it's only emitted for web requests which happen at runtime.
7172
if (
72-
$bootstrap->getObjectManager()->has(Persistence\PersistenceManagerInterface::class)
73+
/** @phpstan-ignore-next-line the object manager interface doesn't specify this method */
74+
$bootstrap->getObjectManager()->hasInstance(Persistence\PersistenceManagerInterface::class)
7375
) {
7476
if (!$request instanceof Mvc\ActionRequest || SecurityHelper::hasSafeMethod($request->getHttpRequest()) !== true) {
7577
$bootstrap->getObjectManager()->get(Persistence\PersistenceManagerInterface::class)->persistAll();

0 commit comments

Comments
 (0)