Summary
When running a php script within the phpcov execute command, starting a session and/or any modifications to an existing session are met with a warning or fatal error due to phpcov's use of headers to echo output.
Current Result
phpcov 8.2.1 by Sebastian Bergmann.
PHP Warning: session_start(): Session cannot be started after headers have already been sent in /exampleDir/phpcovSessionErrorScript.php on line 2
Warning: session_start(): Session cannot be started after headers have already been sent in /exampleDir/phpcovSessionErrorScript.php on line 2
Generating code coverage report in PHP format ... done
or
phpcov 8.2.1 by Sebastian Bergmann.
PHP Warning: session_save_path(): Session save path cannot be changed after headers have already been sent in /exampleDir/phpcovSessionErrorScript.php on line 2
Warning: session_save_path(): Session save path cannot be changed after headers have already been sent in /exampleDir/phpcovSessionErrorScript.php on line 2
Generating code coverage report in PHP format ... done
How to reproduce
Using phpcovSessionErrorScript.php:
Question
Modifying the session is required in the actual script that I wish to execute. Does phpcov already offer an option to suppress output so that headers are not sent? Is there another existing method to circumvent this issue?
Thank you very much for the help and the great tool!
Summary When running a php script within the phpcov execute command, starting a session and/or any modifications to an existing session are met with a warning or fatal error due to phpcov's use of headers to echo output.
Current Result
or
How to reproduce Using phpcovSessionErrorScript.php:
or
Run with:
Question Modifying the session is required in the actual script that I wish to execute. Does phpcov already offer an option to suppress output so that headers are not sent? Is there another existing method to circumvent this issue?
Thank you very much for the help and the great tool!