Bootstrap and require a method from a separate module
For this case you have to add one additional step to your bootstrap code.

Put $kernel-&gt;preHandle($request); right below the $kernel-&gt;boot();