10000 [DI] Fix tracking of source class changes for lazy-proxies by nicolas-grekas · Pull Request #25981 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[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

Merged
merged 1 commit into from
Feb 1, 2018

Conversation

nicolas-grekas
Copy link
Member
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());
Copy link
Contributor
@sroze sroze Jan 31, 2018

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? 🤔

Copy link
Member Author

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 :)

Copy link
Contributor

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.

Copy link
Member Author

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

Copy link
Contributor

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!

@nicolas-grekas nicolas-grekas force-pushed the di-track-proxy branch 2 times, most recently from 1e85db0 to aede64a Compare January 31, 2018 09:18
@@ -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)));
Copy link
Member Author

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

Copy link
Member

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 ?

Copy link
Member Author

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 :))

@fabpot
Copy link
Member
fabpot commented Feb 1, 2018

Thank you @nicolas-grekas.

@fabpot fabpot merged commit 4f18e4b into symfony:3.4 Feb 1, 2018
fabpot added a commit that referenced this pull request Feb 1, 2018
… (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
@nicolas-grekas nicolas-grekas deleted the di-track-proxy branch February 19, 2018 10:35
This was referenced Mar 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants
0