Search code examples
phpunit-testingfunctional-testingacceptance-testingcodeception

Codecept installation gives me an fatal error (bz2 extension)


I am trying to setup Codeception (v1.8) on my local development box (Windows 7 running WAMP).

I have PHP 5.3.13 running and both CURL and bzip2 are enabled modules, when I run the following command to install the 'framework' I get the following error:

php codecept.phar bootstrap

PHP Fatal error: Uncaught exception 'PharException' with message 'bz2 extension is required for bzip2 compressed .phar file "C:\wamp\www\codecept\codecept.phar"' in C:\wamp\codecept\codecept.phar:3

Stack Trace:
#0 C:\wamp\www\codecept\codecept.phar(3): Phar::mapPhar()
#1 {main}
  thrown in C:\wamp\www\codecept\codecept.phar on line 3

......

I have 5.3 running so haven't installed the latest version of Codecept (v2) as that doesn't work with my version of PHP but cannot be sure why this is happening?

Any ideas

P.S I will be using this Codecept with Yii eventually if that makes any difference


Solution

  • the problem you have is because the v2 of codeception requires at least php5.4, downgrade to some of the 1.x versions than you will have no problem.

    Here is the link for the versions