Skip to content

Provide details when PHP process ended prematurely #6382

@greg0ire

Description

@greg0ire
Q A
PHPUnit version 12.4.0
PHP version 8.4.13
Installation Method Composer

Summary

PHPUnit does not print the errors it encounters

Current behavior

PHPUnit prints Fatal error: Premature end of PHP process when running ReproducerTest::testExample.

How to reproduce

  1. Clone https://github.com/greg0ire/phpunit-reproducer
  2. Install dependencies
  3. Run PHPUnit
git clone git@github.com:greg0ire/phpunit-reproducer.git
composer install
vendor/bin/phpunit

Expected behavior

PHPUnit should print the fatal error:

PHP Fatal error:  Declaration of Greg0ire\PhpunitReproducer\Child::__invoke() must be compatible with Greg0ire\PhpunitReproducer\Ancestor::__invoke(): void in /home/gregoire/dev/phpunit-reproducer/src/Child.php on line 7

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions