-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[DI] Fix tracking of source class changes for lazy-proxies #25981
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Q | A |
---|---|
Branch? | 3.4 |
Bug fix? | yes |
New feature? | no |
BC breaks? | no |
Deprecations? | no |
Tests pass? | yes |
Fixed tickets | - |
License | MIT |
Doc PR | - |
@@ -398,6 +398,7 @@ private function generateProxyClasses() | |||
if (!$proxyDumper->isProxyCandidate($definition)) { | |||
continue; | |||
} | |||
$this->container->getReflectionResource($definition->getClass()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where does this method come from and what is it doing? 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From the moon of course! comment added :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's weird, I can't find its definition anywhere. Maybe only on GitHub's moon version? 😄
Though, registering something by calling a getter is weirdo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oups, bad method name :) fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aaaah, makes much more sense!
1e85db0
to
aede64a
Compare
aede64a
to
4f18e4b
Compare
@@ -842,7 +842,7 @@ protected function dumpContainer(ConfigCache $cache, ContainerBuilder $container | |||
$dumper = new PhpDumper($container); | |||
|
|||
if (class_exists('ProxyManager\Configuration') && class_exists('Symfony\Bridge\ProxyManager\LazyProxy\PhpDumper\ProxyDumper')) { | |||
$dumper->setProxyDumper(new ProxyDumper(substr(hash('sha256', $cache->getPath()), 0, 7))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this doesn't serve any purpose now, and made container's cache path-dependend
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we deprecate the salt argument in 4.1 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's possible, although it doesn't really hurt, so low priority on my side (if anyone wants to do it, PR welcome :))
Thank you @nicolas-grekas. |
… (nicolas-grekas) This PR was merged into the 3.4 branch. Discussion ---------- [DI] Fix tracking of source class changes for lazy-proxies | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - Commits ------- 4f18e4b [DI] Fix tracking of source class changes for lazy-proxies