liuggio / fastest

Simple parallel testing execution... with some goodies for functional tests.
MIT License
475 stars 65 forks source link

README: Add phpunit path in examples #103

Closed alexislefebvre closed 7 years ago

alexislefebvre commented 7 years ago

See #99.

tarlepp commented 7 years ago

Hmm, none of those examples work if you add fastest as depency of your current project...

DonCallisto commented 7 years ago

@tarlepp what do you mean? that we should point out even vendor/liuggio/fastest/fastest as running command?

alexislefebvre commented 7 years ago

IIRC, it depends on the value of "config": {"bin-dir": "bin/"} in the composer.json's project, as described here: https://github.com/liuggio/fastest/issues/99#issuecomment-329073430

That's the default value in Symfony project, I don't know about other projects.

We can add a note about this value in the README in order to inform all the users.

DonCallisto commented 7 years ago

@alexislefebvre as said in that issue, if this is installed as a vendor, it will not be under bin as that section of composer is ignored. Normally, if you use standard bin-dir of composer you'll have it under vendor/liuggio/fastest/fastest (it's not a symfony standard)

alexislefebvre commented 7 years ago

@DonCallisto I think that there's a misunderstanding here. I was thinking about documenting how to define "config": {"bin-dir": ""} in the composer.json of users' projects, not in the composer.json of fastest. :wink:

We can use the default path vendor/liuggio/fastest/fastest in all the examples, and add a note about defining "config": {"bin-dir": "bin/"} in the composer.json of the project.

We could also start by explaining that "config": {"bin-dir": "bin/"} is mandatory, but it wouldn't be nice for users who already have defined this value.

DonCallisto commented 7 years ago

Umh, no, actually I don't like this solution: user should be able to point bin-dir everywhere (even in the standard directory).

I would write docs only for standard dir and, eventually, make a note for who use bin-dir (but I think that who use this uncanonical directory should know how to execute a bin command)

alexislefebvre commented 7 years ago

I agree, I will rewrite the paths with the default paths provided by Composer : vendor/liuggio/fastest/fastest, vendor/…/phpunit.

alexislefebvre commented 7 years ago

I rewrote the paths and added a note about defining the bin-dir parameter.

DonCallisto commented 7 years ago

LGTM

@alexislefebvre could you (if you haven't done yet) please try every command to be sure that they're all fine?

At first glance they seems to be fine, but I would like to be sure.

Thanks.

alexislefebvre commented 7 years ago

@DonCallisto OK, I'll try to launch the commands.

DonCallisto commented 7 years ago

@alexislefebvre ping 🤓

alexislefebvre commented 7 years ago

I installed fastest in a empty directory:

composer require --dev 'liuggio/fastest:~1.4'

Both vendor/liuggio/fastest/fastest and vendor/phpunit/phpunit/phpunit paths are executable.

And composer config "bin-dir" "bin" works as expected by creating shortcuts: bin/fastest and bin/fastest.

DonCallisto commented 7 years ago

So can I integrate this in master?

alexislefebvre commented 7 years ago

Yes!

DonCallisto commented 7 years ago

@alexislefebvre thanks mate!