Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
getDummySelectSQL example
$this
->
pingConnection
(
$entityManager
)
;
}
return
$stack
->
next
(
)
->
handle
(
$envelope
,
$stack
)
;
}
private
function
pingConnection
(
EntityManagerInterface
$entityManager
)
: void
{
$connection
=
$entityManager
->
getConnection
(
)
;
try
{
$connection
->
executeQuery
(
$connection
->
getDatabasePlatform
(
)
->
getDummySelectSQL
(
)
)
;
}
catch
(
DBALException
)
{
$connection
->
close
(
)
;
$connection
->
connect
(
)
;
}
if
(
!
$entityManager
->
isOpen
(
)
)
{
$this
->managerRegistry->
resetManager
(
$this
->entityManagerName
)
;
}
}
}