Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
base system
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
5 Jul 2015 at 15:37 UTC
Updated:
29 Jul 2015 at 16:04 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
fabianx commentedComment #2
fabianx commentedComment #3
dawehnerThank you for creating the issue!
Comment #4
Kazanir commentedThe hack actually broke compatibility with HHVM's repo authoritative mode (i.e. their production-mode "no new code allowed" rules) because they don't allow Reflection to change accessibility in this mode:
Fatal error: We've already made many assumptions about private variables. You can't change accessibility in Whole Program mode in /tmp/hhvm-nginx/drupal/core/lib/Drupal/Core/File/MimeType/MimeTypeGuesser.php on line 111Comment #5
dawehnerThis is why we better try to remove the hack and update symfony ...
Comment #6
fabianx commentedI have no idea how to update Symfony, but now its a major bug ...
Comment #7
neclimdulhttps://twitter.com/symfony/status/620658883716075520 should make it easier so we don't have to track a commit. After that is done I can roll a patch.
Comment #8
neclimdulWithin hours... #2504967: Upgrade to Symfony 2.7.1 oh well.
2.7.2 excluding this mess. #2531796: Fix hiddeninput.exe in symfony/console. Does not contain the static fix because... I'm actually not sure what needs to be done.
Comment #9
jibranComment #10
neclimdulnm, that was pretty straightforward.
Comment #11
hussainwebI am thinking this should be separate issues, so that review is easier (or at least separate patches?)
Comment #12
jibranIt's fine as it is because it's not a critical so no hurry.
Comment #14
hussainweb@jibran: This issue is not critical, but the Symfony update may be. I see there are a few security fixes from the changelog and we could stay up to date. This issue can then just deal with removing the hack and fix the tests (and not worry about a 200 kb patch file with unrelated, but necessary changes).
Comment #15
hussainwebFixing the test. To review the actual changes pertinent to this issue, see the interdiff in this comment and the interdiff in #10. This is the reason I was asking for a different issue. Should we still create one?
Comment #16
neclimdulhack-fix just has the fix. but really the previous interdiff covered it.
Fix tests. They where holding on to the instance but upstream unsets the instance not the property.
Comment #18
hussainweb@neclimdul: I think you deleted my patch in #15 by mistake (instead of hiding them?). That was the fix for the failing tests.
Comment #19
hussainwebI am just uploading it again for review. It is essentially the same fix but slightly different. Same filenames as in #15.
Comment #20
hussainwebThat's weird. It shows green but there was a random failure. The same patch in test job in #15 shows all tests passed. So, I think the patch is good for review.
Comment #21
dawehnerLooks fine for me!
Comment #22
jibranIs it related?
Drupal\system\Tests\System\UncaughtExceptionTest 27 passes 4 exceptionsComment #23
alexpottThis comment looks incorrect... I don't think we want to store more and more services during test runs :)
re #22 nope - thats #2532434: UncaughtException test doesn't quite uncatch everything
Comment #24
neclimdulWoops
Comment #26
neclimdulhm... weird. I didn't pull before diff'ing so I guess there was a conflict. Here is a rebase, no change.
Comment #27
neclimdulThe conflict #2392559: Remove all uses of file_stream_wrapper_get_* and file_get_stream_wrappers
Directly diffing the patches:
Comment #28
jibranBack to RTBC.
Comment #29
hussainwebShould we add a comment explaining why we are calling getInstance() repeatedly?
In that vein, it seems like a code smell that a method called
registerWithSymfonyGuesseralso resets theSymfonyMimeTypeGuesser. I would even suggest renaming that method (but that could be in a follow-up, this patch contains Symfony updates as well).PS I still think it would have been a good idea to split the Symfony update in another issue so that this could have been a simpler patch to review. I have created #2533360: Upgrade to Symfony 2.7.2. Feel free to close this one if you think this is done anyway.
Comment #30
hussainwebIf #2533360: Upgrade to Symfony 2.7.2 is handled separately, the patch in #26 becomes this.
EDIT: Hopefully, this is easier to review.
Comment #31
hussainweb#2533360: Upgrade to Symfony 2.7.2 is in. I am reuploading the patch in #30 (which is basically the one I derived from #26) for review. My concerns in #29 still stand:
Since the patch is essentially the same, I am leaving it at RTBC although I'd still like to consider the point above.
Comment #32
fabianx commented#31 As we only do that once very early in Kernel bootstrap that should be fine.
The only case where it would have implications is where we boot a Kernel within a Kernel, in which case we could ignore that.
Comment #33
hussainweb#32, okay. I was concerned with something in contrib calling that method. But if it is only early in the kernel bootstrap, it should be fine. However, if for some reason we boot kernel within a kernel, and a contrib is using that, this would be a problem. A very edge case scenario, I know.
Comment #34
dawehnerI don't think we need to document why we are calling things multiple times in the test.
Comment #35
alexpottFixing title
Comment #36
alexpottCommitted 2873e81 and pushed to 8.0.x. Thanks!