Skip to content

Why using grunt a JS tool in a full PHP project ? #35

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

Closed
shulard opened this issue Feb 27, 2016 · 2 comments
Closed

Why using grunt a JS tool in a full PHP project ? #35

shulard opened this issue Feb 27, 2016 · 2 comments

Comments

@shulard
Copy link
Contributor

shulard commented Feb 27, 2016

Hello !

I discovered that I need to install a node module to be able to test that full php project... I really don't understand why ? It's just too much complexity to just run phpunit, phpcs and phplint...
The complexity which it requires is just useless. Why not using a PHP build tool like Phing to perform the automation ?

@VincentCasse
Copy link
Member

Hi @shulard,

That's a good idea to use PHP build tools instead of grunt :).
Do you know how phing works? Have you already use it?

@shulard
Copy link
Contributor Author

shulard commented Feb 29, 2016

Hi,

Yep I know Phing really well 😄
If you want I can make a PR to implement it !

The only thing that I'm not sure about is the file watch process used to run the pre-commit task.

shulard added a commit to shulard/php-ovh that referenced this issue Apr 19, 2016
As I already mentioned in the ovh#35 issue, I think it's more suitable to use a PHP build tool instead of a JS one. I don't tell that Grunt is not a powerful tool but it's a complicated installation process to be able to run tests.

Phing is required as a composer package and can be run directly after the composer install.

Examples:

```
vendor/bin/phing
vendor/bin/phing test
vendor/bin/phing clean
vendor/bin/phing phplint
vendor/bin/phing phpcs
vendor/bin/phing phpunit
vendor/bin/phing phpunit -Donly.units=true #The travis test process
```

The only difference here is the watch process. Phing doesn't have that kind of feature. It can be emulated with different tasks but require a lot more work. I think that PR is the first step, maybe we can go further if necessary.

Signed-off-by: Stéphane HULARD <[email protected]>
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

No branches or pull requests

2 participants