@lolautruche suggested to use `hasServiceContainer()`, but it  actually doesn't work for me: `ezpKernel::instance()` still throws an exception, and I don't see what I can use to test beforehand.