Skip to content

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Seros
Copy link

@Seros Seros commented Apr 3, 2025

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

@TavoNiievez TavoNiievez force-pushed the fix-kernel-boot branch 3 times, most recently from 8336768 to 171eed3 Compare April 9, 2025 22:40
@TavoNiievez
Copy link
Member

@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.
For the moment I made a commit to avoid that bootshutdownboot directly, trying to follow how it is done in Symfony.

Please follow the contribution guide and we will move forward with this.

@Seros
Copy link
Author

Seros commented Apr 13, 2025

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?

@TavoNiievez
Copy link
Member

@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.

@Seros
Copy link
Author

Seros commented Apr 17, 2025

Added the test, happy to receive feedback

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