Skip to content

Enabling the Symfony error handler when APP_DEBUG is set to 1 #148

@adrian-gheorghe

Description

@adrian-gheorghe

Hello,

On our project we've recently run into an issue that was only reproducible on environments where the APP_DEBUG env var is set to 1 (making Symfony throw exceptions for notices). Our behat tests were still passing, because although APP_DEBUG is enabled in our .env.test file, the bin/behat file does not enable the Symfony debug error handler (Debug::enable()) in the same way public/index.php or bin/console do.

Is there a way to make Debug::enable() run as well by configuration? (we've done that using a BeforeSuite hook for now)
If not, is this something that is desired? Since tests should be as strict as possible, maybe having that as an option would be beneficial.

Thank you

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions