Generally symfony internally seems unaware if its run as a CLI script in
several places. This results in pake tasks attempting to create a
session store, batch scripts attempting to set http headers or generate
metas. Furthermore calls to actions in batch scripts are not considered
to be internal.
Here is an overview of the problems and some suggested fixes:
1) batch/pake scripts should by default set some constant to make it
easy to detect if the request is a CLI call
2) this constant should be checked in sfRenderFilter before attempting
to send the http headers. Additionally it should be considered to check
if headers have already been sent (this suggestion is independent if the
CLI)
3) this constant should also be checked in order to determine if an
action is being called internally or not
4) in sfYamlConfigHandler the mergeConfigValue() method should not
attempt to array_merge() if the value in the specific config is empty()
5) this constant should be checked in order to determine if the session
store should be loaded. this should at the very least be the case for
pake tasks, otherwise you can run into boot strapping issues if you are
trying to setup tables via a pake tasks that are needed for the session
storage. backporting the nostorage container might be an alternative.