Skip to content

load fakeip plugin before cache #335

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
Dec 5, 2022

Conversation

ruano-a
Copy link
Contributor

@ruano-a ruano-a commented Dec 5, 2022

The FakeIpPlugin is now loaded before the CachePlugin, to make the cache based on the fake ip, therefore invalidating it if we change the fake_ip in the config.

Cf #334

@norkunas
Copy link
Member

norkunas commented Dec 5, 2022

Looks like that probably of all providers used versions are gone.. will need to resolve this

@norkunas
Copy link
Member

norkunas commented Dec 5, 2022

Could you rebase? And also would be nice if we'd have a test for this, to prove that this works :)

@ruano-a ruano-a force-pushed the fix/plugin-fakeip-order branch from 0a2424c to bc075df Compare December 5, 2022 12:42
@ruano-a ruano-a force-pushed the fix/plugin-fakeip-order branch from 0c640cc to 160f0ef Compare December 5, 2022 12:50
@norkunas norkunas merged commit 87891d7 into geocoder-php:master Dec 5, 2022
@norkunas
Copy link
Member

norkunas commented Dec 5, 2022

Thank you

@ruano-a
Copy link
Contributor Author

ruano-a commented Dec 5, 2022

I made a test attempt (ruano-a@8cf88d9), but the former issue doesn't seem to happen in the context of the test (I've put the plugin loading in the former order). I don't know if the cache is forcefully turned off somewhere, or if recreating a kernel clears it...

@norkunas
Copy link
Member

norkunas commented Dec 6, 2022

Looking at the https://github.com/SymfonyTest/symfony-bundle-test/blob/master/src/TestKernel.php there is an option $clearCache which is true by default. Try calling setClearCacheAfterShutdown(true) :)

@ruano-a
Copy link
Contributor Author

ruano-a commented Dec 6, 2022

Looking at the https://github.com/SymfonyTest/symfony-bundle-test/blob/master/src/TestKernel.php there is an option $clearCache which is true by default. Try calling setClearCacheAfterShutdown(true) :)

Thanks it was indeed useful, unfortunately it wasn't enough. But it's done, should I put in the same branch for a "remerge", or a new pull request? (I'll rebase if needed, and squash at least the 2 commits related to the test)

@norkunas
Copy link
Member

norkunas commented Dec 6, 2022

New PR please :)

@ruano-a
Copy link
Contributor Author

ruano-a commented Dec 6, 2022

Done #338

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants