I would like to create modules as composer packages (actually fuel-module package) and I would like to create bootstrap.php for them.
I realized that Autoloader::register() is caled after the vendor autoloader (core bootstrap) is called. If I move the autoloader register above that, I can use Autoloader, Config and Event classes in any composer autoloaded FILES (autoloader:file:bootstrap.php).
This blog entry also says that it should be after Autoloader::register. Why isn't it than? Actually it is a bit uncomfortable for me, that I am using modules, but I have to edit the app bootstrap, to use this functionality.
I just realised that Autoloader is accessible from the bootstrap file. Is it a problem to call Autoloader::register() there? So it would be called twice.
Composer is only an installer, nothing else. Modules don't have a bootstap, and if it's a package, you just have to add your vendor folder to the package paths, after which you can just load the package like any other.
You should not have composer do something at load time.