Skip to content
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

Global grumphp or grumphp.phar (like phpunit) #42

Closed
TheRatG opened this issue Sep 18, 2015 · 8 comments
Closed

Global grumphp or grumphp.phar (like phpunit) #42

TheRatG opened this issue Sep 18, 2015 · 8 comments

Comments

@TheRatG
Copy link
Contributor

TheRatG commented Sep 18, 2015

Hello, thanks for your library.

I suggest add new feature - run hook by grumphp.phar

Advantages:

  • you don't need modify your composer
  • global check your code command
  • self-update packet
@TheRatG TheRatG changed the title Global grumphp or grumphp.phar Global grumphp or grumphp.phar (like phpunit) Sep 18, 2015
@TheRatG
Copy link
Contributor Author

TheRatG commented Sep 18, 2015

https://github.com/box-project/box2 - create .phar
https://github.com/box-project/amend - self-update command
https://github.com/cpliakas/manifest-publisher - also for self-update command

@veewee
Copy link
Contributor

veewee commented Sep 18, 2015

That would indeed be a nice feature. Now it is possible to use composer global require, but you would have to change the path of the git hook manually.

@igormukhingmailcom
Copy link
Contributor

I can help with this. Have some experience with tasks like that :)

@veewee
Copy link
Contributor

veewee commented Sep 28, 2015

Maybe it's a better idea to use composer for this?

composer global require phpro/grumphp

This way, GrumPHP will be installed globally in the ~/.composer/vendor/bin.
Update is as easy as:

composer global update phpro/grmphp

Looks easier then creating phar + self-update stuff, since everybody is using composer these days.
In the git hooks we will need to add something like:

PATH=$PATH:/full/path/to/project/vendor/bin
# Note: I need to check if this works on windows ...

This way we can change the command to just grumphp. It will first search all your system include paths (in which the global composer vendor/bin directory is added). When no script is found, it will use the one from the project vendor/bin directory.

What are your thoughts on this solution? A phar looks one step too far for me, since it can easliy be done with composer.

veewee added a commit that referenced this issue Oct 26, 2015
Introducing Events, Progress and a run command.
Fixes #46, #33, #20, #42.
@veewee
Copy link
Contributor

veewee commented Oct 26, 2015

This one is implemented as mentioned above.
More information:
https://github.com/phpro/grumphp#global-installation

@veewee veewee closed this as completed Oct 26, 2015
@veewee veewee mentioned this issue Nov 17, 2015
@ad3n
Copy link

ad3n commented Nov 18, 2015

I think is better use phar as optional. Like others php tool (php-cs-fixer, deployer, and many more) has own phar file for simplifying the task.

I think many people more familiar with phar instead of global package in composer.

@ad3n
Copy link

ad3n commented Nov 19, 2015

vinkla/climb#28

@ad3n
Copy link

ad3n commented Nov 19, 2015

The reason why you need phar file instead of global composer

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

No branches or pull requests

4 participants