Bug #11207

Fatal error when PHPUnit is not installed

Added by Bastian Waidelich about 11 years ago. Updated about 11 years ago.

Must have
- Testing -
Start date:
Due date:
% Done:


Estimated time:
PHP Version:
Has patch:


PHPUnit and vfs(stream) are no longer included with the FLOW3 distribution.
But still, the core relies on those libraries.
Running FLOW3 without the respective PEAR packages installed, PHP dies with a fatal error:

Fatal error: require_once() [function.require]: Failed opening required 'PHPUnit/Autoload.php'

IIRC the plan is to get rid of the dependency (as long as you don't want to run the unit tests of course).
But anyways, the fatal error should be avoided by checking for the existence of the required PEAR packages IMO

Related issues

Related to TYPO3.Flow - Feature #1856: The Package Manager checks dependencies between packages on each activation / deactivationNewChristopher Hlubek2008-10-27


Updated by Robert Lemke about 11 years ago

  • Target version set to 1.0 alpha 14

Updated by Karsten Dambekalns about 11 years ago

  • Status changed from New to Accepted
  • Assignee set to Karsten Dambekalns

Updated by Karsten Dambekalns about 11 years ago

  • Status changed from Accepted to Needs Feedback

The problem consists of two parts.

  1. The BaseTestCase (and it's two friends FunctionalTestCase and SeleniumTestCase) need PHPUnit
  2. The web-based testrunner needs PHPUnit

The first one is easily solved by moving those to the Build/Common/PhpUnit/ folder. They can then be included by the respective bootstrap files so there is never a need to include them some other way. Nice.

The testrunner still needs to be solved. Options:

  1. Require people to install PHPUnit. Con: obviously not pratical
  2. Ship a PackageStates.yaml that disables Testing. Con: some time ago we removed PackageStates.yaml from the distributions and create it upon first hit if not yet existent.
  3. Add PEAR dependency checking to the package manager and ignore packages with missing dependencies when creating PackageStates.yaml for the first time.

I wanted to do the dependency checking, but that is where the shit hits the fan. Using PEAR checking for installed packages is not possible says Robert, and it would also be a dead end, as Pyrus (PEAR2) is on the horizon.

Pyrus looks really nice, it is packaged in one phar file and I even managed to use it for dependency checking. Needs some polishing and could be pushed for review. But it is not a solution... because you still need to configure Pyrus before it makes sense. Because without being configured it does not know where PEAR packages would be installed and where the channel registry is. Thus it cannot check for any installed package.

Which leaves us where we started: the user needs to fix things before running into problems. Now what? Solutions, ordered by niceness:
  1. Remove the Testing package completely
  2. Ship a PackageStates.yaml that makes testing inactive

Please choose... (I favour 1)


Updated by Karsten Dambekalns about 11 years ago

  • Status changed from Needs Feedback to Under Review

Updated by Karsten Dambekalns about 11 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

Resolved by shipping a PackageStates.yaml with Testing disabled.

Also available in: Atom PDF