-
Notifications
You must be signed in to change notification settings - Fork 6
Add phpunit as a development dependency #134
Conversation
So executing ``composer.phar install --dev`` will install phpunit. To execute the test suite just run: $ vendor/bin/phpunit test/
@cabello Thank you for the PR. Has this become the preferred way to install phpunit as Foundation currently relies on pear as per
Not sure that you will need both.... |
I don't know which way of installing phpunit is the most popular nowadays, what I like about composer is that it doesn't require sudoer and it's sandboxes everything inside the project folder, look at the
With composer you can have a project using phpunit 3.0.* and another one using 3.4.* without then affecting each other nor the system they are running on. |
@cabello if I am not mistaken Foundation will install pear in your home folder instead of I see the make target still warns about
Please verify and if you want to roll a PR to fix that I will gladly merge. Please don't let my disagreements demotivate you from contributing and that said, you are always welcome still to convince me otherwise =) Send me a 👍 if you're cool! |
Hi @nickl- I tried to install phpunit using $ which phpunit I am using Mac Mavericks and homebrew. |
This is odd.... My Do you agree with my assessments so for? I agree that using sudo for pear is a pain and we can certainly look at a remedy for that. |
My I understand your argument and it works well, however nowadays people (like myself) prefer to install the dependencies separated from the system or a specific user account to avoid dependencies conflicts. I've worked in many projects that a minor version would crash our application so we would rollback to the previous one and if by the time it was not fixed yet we installed another project with the most updated version (because the bug was not affecting this project code) we would have a conflict, needing to install the dependencies in different places and have to manage it manually. This concept of sandboxing the project dependencies is not new, but it was migrated from being optional (install with
I've being using My workflow for working in new projects nowadays is:
What's is nice about it, is that I don't need to worry that this project is really outdated and is using Symfony 2.0, because it will work and run nicely. 😄 |
Unfortunately, Composer wasn't so popular (and far from stable) at the time. I do agree that its workflow has become preferrable and Foundation may need an update, but I'm not sure the I'm not that fond of this design as I used to be, but I believe it is important to keep its conceptual integrity. People are used to just run "wget git.io/Makefile && make foundation" then having a PHPunit installed, we need to do that for people who prefer composer as well. Perhaps identify which package manager is more suited for the job, which brings me back to aero, a project which branched from Foundation just to manage multi-package-manager environments. We were discussing about Composer behavior there a while ago. |
So executing
composer.phar install --dev
will install phpunit.To execute the test suite just run: