8000 Check if kernel has booted when checking availability of the container by rubanooo · Pull Request #11635 · pimcore/pimcore · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Check if kernel has booted when checking availability of the container #11635

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
Mar 14, 2022
Merged

Check if kernel has booted when checking availability of the container #11635

merged 1 commit into from
Mar 14, 2022

Conversation

rubanooo
Copy link
Contributor
@rubanooo rubanooo commented Mar 9, 2022

In my very specific use case, I'm trying to read class definition files before loading the kernel. When including php files of class definition some calls are made to the Pimcore Runtime cache. This is fine because the runtime cache exposes a method that checks if the container is available before trying to initialize the cache instance.

The only problem is that Symfony\Component\HttpKernel\Kernel::getContainer throws an error when the kernel hasn't booted yet. Which in turn causes the runtime cache to fail.

I have added a try catch clause to the hasContainer check to make sure the kernel has also booted.

@brusch brusch added this to the 10.3.3 milestone Mar 14, 2022
8000
@brusch brusch added the Bug label Mar 14, 2022
@brusch
Copy link
Member
brusch commented Mar 14, 2022

LGTM, thank you! 👍

@brusch brusch merged commit a3f9146 into pimcore:10.3 Mar 14, 2022
@rubanooo rubanooo deleted the patch-1 branch March 14, 2022 17:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0