Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHPunit 9 fails when xhgui.collector is enable #45

Open
tyler36 opened this issue Nov 25, 2024 · 0 comments
Open

PHPunit 9 fails when xhgui.collector is enable #45

tyler36 opened this issue Nov 25, 2024 · 0 comments

Comments

@tyler36
Copy link
Collaborator

tyler36 commented Nov 25, 2024

@sreichel reports issues with phpunit when running xhgui.collector.php is loaded.
#33 (comment)

Laravel 11 with PHPunit 10 works fine but it does collect data which may slow down tests.

Solution

Consider adding further checks

if (file_exists("/mnt/ddev_config/xhgui/collector/xhgui.collector.php")) {
 require_once "/mnt/ddev_config/xhgui/collector/xhgui.collector.php";
}
if (getenv('IS_DDEV_PROJECT') == 'true' && getenv('NO_XHGUI') !== '1') {
    if (file_exists($xhgui = '/mnt/ddev_config/xhgui/collector/xhgui.collector.php')) {
        require_once $xhgui;
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant