If Java is upgraded and the old Java version is unmerged, php is unable to load the java extension and fails to start. I think this is because the path to the old Java version's libjava.so is hard-coded into /etc/php/*/php.ini; for me, re-emerging php updated the path in the configuration file (after an etc-update, of course), at which point php worked. It's worth noting that revdep-rebuild didn't rebuild PHP. I'm not sure if PHP can be changed to not use absolute paths. It's probably impractical to expect Java to update paths in php.ini. If php is fixed to the library it compiles against, would is be possible to link some executable against libjava.so so revdep-rebuild would rebuild PHP? (This seems like something obvious, so my apologies if it turns out that I missed an einfo message or something else obvious.)
revdep-rebuild is broken... *** This bug has been marked as a duplicate of 118531 ***
My bug was about the fact that Java breaks and mentioned that revdep-rebuild doesn't fix it; bug 118531 was about the fact that revdep-rebuild doesn't fix it and why. These two bugs are about the same problem, but, even if 118531 is fixed, it's still wrong to assume users will know to run revdep-rebuild after a Java update. They'll need to find something broken, start searching for bugs, maybe find this one, ... I'm reopening this bug because, once revdep-rebuild is fixed, einfo messages should still be added to the Java ebuild to tell people that they need to run it. (Also, technically, wouldn't 118531 be a dup of mine, not the other way around?)
Tracking identical issue in two different places is a bad idea, duping again. *** This bug has been marked as a duplicate of 118531 ***