Skip to content

Introduce "composer test" script #5

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

RobLoach
Copy link

@RobLoach RobLoach commented May 1, 2015

Composer scripts allows running commands through composer, along with the updated bin PATHs. We can use this to run the tests through phpzone itself.

For some reason, behat is failing for me. Works on Travis though.

@jakubzapletal
Copy link
Member

Thanks for PR! I just wonder why do you want to run this via composer when it could be run directly by bin/phpzone tests?

@RobLoach
Copy link
Author

RobLoach commented May 2, 2015

A few reasons:

  1. I don't have phpzone installed globally

  2. composer test is easier to remember than bin/phpzone tests

  3. Simplifies .travis.yml

  4. Composer registers bin PATHs for us so composer script ends up being just phpzone tests, again loosing the bin/

  5. Ends up being documented when running the composer command....

    show Show information about packages
    status Show a list of locally modified packages
    test Run the test script as defined in composer.json.
    update Updates your dependencies to the latest version according to composer.json, and updates the composer.lock file.

It all comes down to simplification. No real gain here other than that.

@jakubzapletal
Copy link
Member

I see your point. It's good idea to have it in composer, but I thin it would be better to have "old" travis or use bin/phpzone tests there because not too much people now feature of scripts in composer and it could be confusing for them. What do you think?

@RobLoach
Copy link
Author

RobLoach commented May 4, 2015

not too much people now feature of scripts in composer and it could be confusing for them.

What if, across all PHPZone projects, we were to document it in README.md under a "Development" heading? The only way to teach people is to document and use it.

@jakubzapletal
Copy link
Member

I'm not sure if it is a good move. This project was created as a tool to make a development easier and it would be awkward if this project would use Composer for development. I think we should be an example to others how PhpZone could be used.

Thanks to your opinion to be able to run commands without bin/ I am thinking to create PhpZone also as a stand-alone app like Composer so that it could be installed locally or globally and then called simply by phpzone COMMAND. But I am still thinking if it's a good idea and if do this for release 0.2 or let it for 0.3. What is your opinion?

@RobLoach
Copy link
Author

@jakubzapletal Agreed... And have it used across all phpzone projects too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants