Cakephp: PHP Fatal error: Class 'PHPUnit\Framework\BaseTestListener' not found

Created on 19 Feb 2018  路  3Comments  路  Source: cakephp/cakephp

This is a (multiple allowed):

  • [x] bug
  • [x] enhancement

  • CakePHP Version: latest master

What you did

plugin development, travis is now red for newer PHP versions

PHP Fatal error:  Class 'PHPUnit\Framework\BaseTestListener' not found in 
/home/travis/build/dereuromark/cakephp-ide-helper/vendor/cakephp/cakephp/src/TestSuite/Fixture/FixtureInjector.php ...

See e.g. https://travis-ci.org/dereuromark/cakephp-ide-helper/jobs/343435569

This can happen if the constraint isnt locked down to PHPUnit 5|6 but also allows for 7 to be pulled.
Mainly because cakephp/cakephp only has a require-dev dependency here to PHPUnit, of course.

What you expected to happen

Can we class alias or fix it somehow - as we did for some classes in the past?
So PHPUnit 7 is also supported?

defect enhancement

Most helpful comment

OK, so we dont plan to support it anytime soon using some shims or alike? Then we can disregard.

I think in 4.0 we can move to PHPUnit 7+.

All 3 comments

This can happen if the constraint isnt locked down to PHPUnit 5|6 but also allows for 7 to be pulled.

So don't do that. PHPUnit 7 has a number of backwards incompatible changes that make it hard to be compatible with both PHPUnit 6 and PHPUnit 7.

OK, so we dont plan to support it anytime soon using some shims or alike? Then we can disregard.

OK, so we dont plan to support it anytime soon using some shims or alike? Then we can disregard.

I think in 4.0 we can move to PHPUnit 7+.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

inoas picture inoas  路  4Comments

Code-Working picture Code-Working  路  3Comments

inoas picture inoas  路  3Comments

nrother picture nrother  路  3Comments

jorisvaesen picture jorisvaesen  路  3Comments