home/shinnya/.phpbrew/build/php-5.2.17/ext/dom/node.c: In function ‘dom_canonicalization’: I found the following error message in build.log: ', '+default ') #2 /home/shinnya/repos/mine/phpbrew.git/vendor/corneltek/cliframework/src/CLIFramework/CommandBase.php(658): call_user_func_array(Array, Array) #3 /home/shinnya/repos/mine/phpbrew.git/vendor/corneltek/cliframework/src/CLIFramework/Application.php(282): CLIFramework\CommandBase->executeWrapper(Array) #4 /home/shinnya/repos/mine/phpbrew.git/bin/phpbrew(21): CLIFramework\Application->run(Array) #5 thrown in /home/shinnya/repos/mine/phpbrew.git/src/PhpBrew/Tasks/ConfigureTask.php on line 124
1 ' in /home/shinnya/repos/mine/phpbrew.git/src/PhpBrew/Tasks/ConfigureTask.php:124 Stack trace: #0 /home/shinnya/repos/mine/phpbrew.git/src/PhpBrew/Command/InstallCommand.php(355): PhpBrew\Tasks\ConfigureTask->configure(Object(PhpBrew\Build), Object(GetOptionKit\OptionResult)) #1 : PhpBrew\Command\InstallCommand->execute( '. Use tail command to see what 's going on: $ tail -F /home/shinnya/.phpbrew/build/php-5.2.17/build.log PHP Fatal error: Uncaught exception 'RuntimeException ' with message 'Configure failed. = > Moving /home/shinnya/.phpbrew/tmp/php-5.2.17 to /home/shinnya/.phpbrew/build/php-5.2.17 = > Extracting /home/shinnya/.phpbrew/distfiles/php-5.2.17.tar.bz2 to /home/shinnya/.phpbrew/tmp/php-5.2.17 = > /home/shinnya/.phpbrew/distfiles/php-5.2.17.tar.bz2 downloaded. To stop your Vagrant VM, exit the SSH shell and type `vagrant halt` or `vagrant suspend`.8.67/8.67MB 100% Obviously, you repeat steps 5 through 7 for each version of PHP you want to test on. $ phpunit -stderr -d memory_limit=-1 Zend/Amf/AllTests.php $ phpunit -stderr -d memory_limit=-1 Zend/Acl/AclTest.php Pe is a handy shell function that Derick wrote that changes your PHP environment to whichever version your specify.Īlternatively, you can run each component’s tests individually: You can compile any version I have 5.2.4, 5.2.12, 5.3.3 and 5.3.11 installed at the moment…
This also takes a while as it compiles PHP for you! It also installs PHPUnit 3.4 as that’s the version we need to unit test ZF1.Įach version of PHP that you compile is stored in /usr/local/php/. Vagrant sets up key-less ssh connections to the VM that “just works” :) Once it has finished, it will exit and leave you back at the command prompt.
This will take a long while as it has to download a VM image and then provision it. The process to set up ZF1 to run unit tests in a VM using PHPUnit 3.4, follow these steps:ġ. I’m sure this isn’t optimal, but it works :) Running ZF1 unit tests
I chose to use puppet to install the required packages and created a simple default.pp configuration. "setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate/v-root", "1" The way to solve this is to add the following to the Vagrantfile: One thing that I discovered was that by default, the VM cannot create symlinks in /vagrant. I based this script on information in Derick Rethans’ excellent Multiple PHP versions set-up article. As such it sets up a simple Ubuntu VM with the required toolchain for compiling PHP and provides a script called php-build.sh which will download and build any PHP 5.2, 5.3 or 5.4 version that you are interested in. The Vagrant set up for ZF1 is designed for testing ZF1 against multiple PHP versions.
This means that you can continue to edit your code in your local editor/IDE and test it within the VM easily. The really cool thing about it however from my point of view is that vagrant automatically sets up the VM with a folder called /vagrant that holds the code on your local hard drive from where you started the VM. Vagrant is a fantastic tool that enables you to manage and run virtual machines from the command line, including automatic provisioning of them using puppet or chef. I was motivated by some work the joind.in folks have done to get a working development environment for joind.in development using Vagrant. I recently added support for vagrant to the Zend Framework codebase to enable easier testing.