Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit16befcd

Browse files
committed
Merge branch '6.1' into 6.2
* 6.1: [DoctrineBridge] Don't reinit managers when they are proxied as ghost objects Revert "bug#46125 [FrameworkBundle] Always add CacheCollectorPass (fancyweb)"
2 parentsa057029 +e5e88ba commit16befcd

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

‎src/Symfony/Bridge/Doctrine/ManagerRegistry.php‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,15 @@
1212
namespaceSymfony\Bridge\Doctrine;
1313

1414
useDoctrine\Persistence\AbstractManagerRegistry;
15+
useProxyManager\Proxy\GhostObjectInterface;
1516
useProxyManager\Proxy\LazyLoadingInterface;
1617
useSymfony\Bridge\ProxyManager\LazyProxy\Instantiator\RuntimeInstantiator;
1718
useSymfony\Component\DependencyInjection\Container;
1819

1920
/**
2021
* References Doctrine connections and entity/document managers.
2122
*
22-
* @authorLukas Kahwe Smith <smith@pooteeweet.org>
23+
* @author Lukas Kahwe Smith <smith@pooteeweet.org>
2324
*/
2425
abstractclass ManagerRegistryextends AbstractManagerRegistry
2526
{
@@ -49,6 +50,9 @@ protected function resetService($name): void
4950
if (!$managerinstanceof LazyLoadingInterface) {
5051
thrownew \LogicException('Resetting a non-lazy manager service is not supported.'.(interface_exists(LazyLoadingInterface::class) &&class_exists(RuntimeInstantiator::class) ?sprintf('Declare the "%s" service as lazy.',$name) :'Try running "composer require symfony/proxy-manager-bridge".'));
5152
}
53+
if ($managerinstanceof GhostObjectInterface) {
54+
thrownew \LogicException('Resetting a lazy-ghost-object manager service is not supported.');
55+
}
5256
$manager->setProxyInitializer(\Closure::bind(
5357
function (&$wrappedInstance,LazyLoadingInterface$manager)use ($name) {
5458
if (isset($this->aliases[$name])) {

‎src/Symfony/Bundle/FrameworkBundle/FrameworkBundle.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,12 +163,12 @@ public function build(ContainerBuilder $container)
163163
$container->addCompilerPass(newRegisterReverseContainerPass(true));
164164
$container->addCompilerPass(newRegisterReverseContainerPass(false), PassConfig::TYPE_AFTER_REMOVING);
165165
$container->addCompilerPass(newRemoveUnusedSessionMarshallingHandlerPass());
166-
$container->addCompilerPass(newCacheCollectorPass(), PassConfig::TYPE_BEFORE_REMOVING);
167166

168167
if ($container->getParameter('kernel.debug')) {
169168
$container->addCompilerPass(newAddDebugLogProcessorPass(), PassConfig::TYPE_BEFORE_OPTIMIZATION,2);
170169
$container->addCompilerPass(newUnusedTagsPass(), PassConfig::TYPE_AFTER_REMOVING);
171170
$container->addCompilerPass(newContainerBuilderDebugDumpPass(), PassConfig::TYPE_BEFORE_REMOVING, -255);
171+
$container->addCompilerPass(newCacheCollectorPass(), PassConfig::TYPE_BEFORE_REMOVING);
172172
}
173173
}
174174

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp