DEVELOPMENT_README.txt 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. Development using a virtual machine
  2. ###################################
  3. You can set up a development virtual machine for ZF1 unit testing and library
  4. development following these simple instructions.
  5. 1. Install requirements for VM. (Note: these are not required by ZF1 itself)
  6. - VirtualBox (https://www.virtualbox.org/)
  7. - Ruby (http://www.ruby-lang.org/)
  8. - Vagrant (http://vagrantup.com/)
  9. 2. Checkout repository to any location
  10. > svn checkout http://framework.zend.com/svn/framework/standard/trunk zf1-dev
  11. > cd zf1-dev
  12. 3. Start the process by running Vagrant.
  13. > vagrant up
  14. This will take a long while as it has to download a VM image and then
  15. provision it. Once it has finished, it will exit and leave you back at the
  16. command prompt.
  17. 4. SSH into the VM
  18. > vagrant ssh
  19. 5. Build a version of PHP.
  20. > php-build.sh 5.3.11
  21. This also takes a while as it compiles PHP for you!
  22. 6. Select PHP to use:
  23. > pe 5.3.11
  24. 7. Run tests
  25. > cd /vagrant/tests
  26. > phpunit --stderr -d memory_limit=-1 Zend/Acl/AclTest.php
  27. > phpunit --stderr -d memory_limit=-1 Zend/Amf/AllTests.php
  28. (etc...)
  29. Note that you can repeat items 5 and 6 to create any version if PHP.
  30. Notes:
  31. - The VM will be running in the background as VBoxHeadless
  32. - HTTP and SSH ports on the VM are forwarded to localhost (22 -> 2222, 80 -> 8081)
  33. - The zf1-dev directory you checked out will be mounted inside the VM at /vagrant
  34. - You can develop by editing the files you cloned in the IDE of you choice.
  35. - To stop the VM do one of the following:
  36. > vagrant suspend # if you plan on running it later
  37. > vagrant halt # if you wish to turn off the VM, but keep it around
  38. > vagrant destroy # if you wish to delete the VM completely
  39. - Also, when any of of the Puppet manifests change (.pp files), it is a good idea to rerun them:
  40. > vagrant provision