-
Notifications
You must be signed in to change notification settings - Fork 25
Replace kernel reboot with actual boot to reset services #209
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
171eed3
to
de81c28
Compare
@Seros Since this change affects the Connector we do need a test for this. Both to know that we are not breaking anything and that it will not break again. Please follow the contribution guide and we will move forward with this. |
I see. Thanks for making this clear and improving the logic. For my particular problem I would need to install and configure api-platform/symfony v4 in the test project to reproduce the faulty behaviour. Would this be ok? |
@Seros Yes. I would like to have it as an independent branch with a separate job, but for the moment you can send a normal PR, I will take care of setting it up. |
@TavoNiievez Added the test, happy to receive feedback |
@Seros Sorry, I've been busy with some PR on the core project. I'll check it out this weekend. |
Hey, just wondering if you have an estimated timeline for when this PR might be reviewed and potentially merged? |
de81c28
to
c55322b
Compare
00c4dfa
to
910ee3c
Compare
# Conflicts: # .github/workflows/main.yml
910ee3c
to
0149f51
Compare
@Seros I just reverted the changes in this conditional: - if ($this->hasPerformedRequest && $this->rebootable) {
- $this->rebootKernel();
- } else {
- $this->hasPerformedRequest = true;
- }
+ if ($this->rebootable) {
+ if ($this->hasPerformedRequest) {
+ $this->rebootKernel();
+ } else {
+ $this->hasPerformedRequest = true;
+ }
+ } because:
I also just modified the CI to test the branch you added in the test project, that was the missing step. With that we are ready to move on. Thank you! |
Got it. Thanks a lot for merging this! |
Hi, Would it be possible to cut a new release that includes these changes? The fix helps a lot with Symfony compatibility and unblocks my team (and likely others) who were running into issues with kernel service resets. It would be awesome to have this available in an official release, as it’s currently not included in the latest (v3.5.1). |
Hi,
we are using codeception in our api-platform project and atm we are blocked because of symfony/symfony#59036. It got resolved for users of phpunit with WebTestCase tests but in codeception we are still struggling with this. I debugged this and compared both the same workflow of tests in codeception and phpunit. There I noticed that in \Symfony\Bundle\FrameworkBundle\KernelBrowser::doRequest the kernel is booted and shut down before the request and in codeception the kernel is just rebooted without calling the function to reset all resettable services. This change should fix this and ensure, that the requests formats are in a valid state before each request. I'll try to provide a test for this later on. For now I just ensured that current tests are not breaking