Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[DI] deprecate booting the kernel twices#32056
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
[DI] deprecate booting the kernel twices#32056
Uh oh!
There was an error while loading.Please reload this page.
Conversation
25f9522 tob849aabCompareKoc commentedJun 18, 2019
This looks like BC-break |
Uh oh!
There was an error while loading.Please reload this page.
xabbuh commentedJun 18, 2019
And I agree with@Koc, this has potential to break lots of tests if I don't miss anything. We could deprecate this in 4.4 though and throw in 5.0 then. |
xabbuh commentedJun 18, 2019
By the way, our test suite contains an example of a valid test that would fail with this change (see the failing CI jobs). |
b849aab to29a08eeCompareSimperfit commentedJun 19, 2019
PR rebase with 4.4, tests fixed and deprecation added. |
29a08ee tob5aabd9Compareb5aabd9 to905bec4CompareSimperfit commentedJun 29, 2019
cc@fabpot |
fabpot commentedJul 8, 2019
Thank you@Simperfit. |
This PR was merged into the 4.4 branch.Discussion----------[DI] deprecate booting the kernel twices| Q | A| ------------- | ---| Branch? | 4.4| Bug fix? | yes| New feature? | no <!-- please update src/**/CHANGELOG.md files -->| BC breaks? | no <!-- seehttps://symfony.com/bc -->| Deprecations? | yes <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->| Tests pass? | yes <!-- please add some, will be required by reviewers -->| Fixed tickets |#31233 <!-- #-prefixed issue number(s), if any -->| License | MIT| Doc PR | ? <!-- required for new features --><!--Replace this notice by a short README for your feature/bugfix. This will help peopleunderstand your PR and can be used as a start for the documentation.Additionally (seehttps://symfony.com/roadmap): - Bug fixes must be submitted against the lowest maintained branch where they apply (lowest branches are regularly merged to upper ones so they get the fixes too). - Features and deprecations must be submitted against branch 4.4. - Legacy code removals go to the master branch.-->This adds a check to see if the kernel has been booted twices in a single test, and throw a deprecationCommits-------905bec4 [DI] throw an exception when the kernel has been booted twices
teohhanhui commentedAug 26, 2019 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
This means we cannot boot the kernel, set some state in a service (e.g. fixture data in memory), then create the client to test requests. WDYT about not (re)booting the kernel if it's already booted? Edit: Never mind. This wouldn't work as |
…eal one instead (nicolas-grekas)This PR was merged into the 4.4 branch.Discussion----------[FrameworkBundle] Don't reset the test container but the real one instead| Q | A| ------------- | ---| Branch? | 4.4 for features / 3.4 or 4.3 for bug fixes <!-- see below -->| Bug fix? | yes/no| New feature? | yes/no <!-- please update src/**/CHANGELOG.md files -->| Deprecations? | yes/no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->| Tickets | Fix #... <!-- prefix each issue number with "Fix #", if any -->| License | MIT| Doc PR | -After#31202 and#32056, the tearDown method keeps throwing deprecation notices about "Getting the container from a non-booted kernel". The reason is that resetting the test-container calls `$kernel->getContainer()` while the kernel has been shut down.This fixes it and a few other glitches found meanwhile.Commits-------8e16143 [FrameworkBundle] Dont reset the test container but the real one instead
acasademont commentedNov 21, 2019 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Hi@Simperfit We just upgraded to SF 4.4 and now there's this deprecation notice, but tbh, we don't know how to fix it. The docs say that you specifically need to create 2 clients here, but this is now not allowed. Actually, doing what the docs say leads to an exception in SF 5 https://symfony.com/doc/current/testing/insulating_clients.html What's the proper upgrade path if we need multiple clients? |
chalasr commentedNov 22, 2019
@acasademont Please open a new issue. Thank you |
Uh oh!
There was an error while loading.Please reload this page.
This adds a check to see if the kernel has been booted twices in a single test, and throw a deprecation