PHPWord icon indicating copy to clipboard operation
PHPWord copied to clipboard

Unit Checks Broken for PHP8.3 and PHP8.4

Open rasamassen opened this issue 4 months ago • 1 comments

Describe the bug and add attachments

When all the other PHPUnit checks fail because the expected output and the actual output do not match, 8.3 and 8.4 checks are currently passing. Something must be wrong with those checks, because they should be failing in such a scenario.

Expected behavior

If all the other units fail because of unexpected output, 8.3 and 8.4 should fail too.

Steps to reproduce

Change any unit test so that the expected and actual do not match.

PHPWord version(s) where the bug happened

master

PHP version(s) where the bug happened

8.3 and 8.4

Priority

  • [ ] I want to crowdfund the bug fix (with @algora-io) and fund a community developer.
  • [ ] I want to pay the bug fix and fund a maintainer for that. (Contact @Progi1984)

rasamassen avatar Oct 10 '25 16:10 rasamassen

Php8.3/4 unit tests run Phpunit 12, but most of the test suite is not Phpunit-12-compatible. So - tons of errors and failures. These wind up being ignored because something about Phpunit 12 causes TCPDFTest to fail in such a way that TCPDF issues "die" rather than throwing an exception, causing a premature end to the test suite, and, for some reason, an indication of success(?).

To prevent these problems, composer.json should be changed to not allow Phpunit 12. (It probably shouldn't allow Phpunit 11 either, but that will succeed, despite a lot of deprecations.)

oleibman avatar Nov 13 '25 11:11 oleibman