-
-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Developement environment preparation #7
Comments
Hi sugalvojau, thanks for the great suggestion! We can think of adding instructions in the website to create such an environment( with Vagrant and Virtualbox ). If there is interest we can include these instructions also in the future versions of the book. |
Created the https://github.com/slaff/learnzf2-box repository. The initial version of the Vagrant script will follow soon. |
@sugalvojau The box can be downloaded and tested from https://github.com/slaff/learnzf2-box. It would be great if you can test it and give your feedback. |
Hi slaff, you are quite fast with changes. Happy to see the result. However, running unit tests does not work for me. I get exactly the same result as before (see the previous link to stackoverflow). I am not so sure why I am going into the same situation over and over again, but I have some assumptions on reasons.. I will test more in coming days. Will give a feedback. |
@slaff The line of composer.json file used in the book: "phpunit/phpunit" : "3.7.*" I have changed Tested on Windows 8.1, Ubuntu Trusty 14.04 LTS x64, the isolated development environment you provide. Works well. There is also a way to make PHPUnit 3.7.* work on all systems (same systems tested by me), but the command must be changed to: So... Here we have two ways mentioned to go with PHPUnit tests to make them work. It is up to you to decide witch of two is better. I would prefer the one with increasing PHPUnit version to 4.5 at the moment. As far as I have tested the isolated development environment you provide - the environment works well. Of course, except the PHPUnit tests part. By the way, as mentioned in stackowerflow, I have tried running PHPUnit 3.7.* in my shared hosting environment (I believe it has RedHat or CentOS installed) and the examples from the book worked well in that hosting environment. Environment configuration changes to make the environment fit the latest version of the book (vs.) code changes to make code portable. What is the right way to go? |
I would suggest you to add instructions on how to build the same development environment as yours. For example, a short introduction on virtual box, vagrant or at least puPHPet would be nice to have as a chapter. Why do I say so? I say so because I tried to run unit tests on Windows computer (I use one with Windows 8.1 OS) and then I got some major errors... I was not able to run unit tests the way you wrote (for example, at page 103 of the first edition book). Running the same commands on Linux results in success.
This is the place you could read more about the problem I got:
http://stackoverflow.com/questions/27999373/why-phpunit-test-does-not-work-zf2
Many thanks for The Book! It helps a lot.
The text was updated successfully, but these errors were encountered: