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

create composer package #4

Closed
schmunk42 opened this issue Jun 10, 2015 · 10 comments
Closed

create composer package #4

schmunk42 opened this issue Jun 10, 2015 · 10 comments

Comments

@schmunk42
Copy link
Contributor

This code does magic!

Could you create a composer package and make it available via vendor/bin

cmrcx added a commit that referenced this issue Jun 11, 2015
@cmrcx
Copy link
Owner

cmrcx commented Jun 11, 2015

Thanks for the suggestion. Is this what you expect? I'm not sure what sense the vendor binary makes in this project.

@schmunk42
Copy link
Contributor Author

The change looks good, just one thing to note... Most files in vendor/bin don't use the .php extension.

What's about adding a wrapper to accomplish this, so we could run vendor/bin/phptidy in the end, while maintaining BC.

@cmrcx
Copy link
Owner

cmrcx commented Jun 16, 2015

I'm still not sure what the sense of this vendor binary thing is. Can you please describe a use case with phptidy, in which the composer package and the vendor binary link are helpful?

@schmunk42
Copy link
Contributor Author

So I have the code generator mentioned above.
It's generating PHP code, but it's hard to maintain a beautiful source code.

In the generator extension I would like to require cmrcx/phptidy with composer.
When giiant gets installed, phptidy gets installed and its "binary" is placed into vendor/bin and I can execute it in my extension, after code-generation, from this specific location and I don't have to worry if you may change the path in the future.

It's basically a standardized system of composer providing CLI scripts, in my current project the vendor/bin looks like this:

  • apidoc (Yii 2.0 doc generator CLI)
  • markdown
  • markdown-latex
  • php-cs-fixer (code-style fixer, similar to yours, but without indentation)

@schmunk42
Copy link
Contributor Author

Moreover ... you can install it globally with composer global require ..., so it's usually available in your PATH then.

cmrcx added a commit that referenced this issue Jun 19, 2015
cmrcx added a commit that referenced this issue Jun 19, 2015
@schmunk42
Copy link
Contributor Author

👍 😄

@cmrcx cmrcx closed this as completed Sep 3, 2015
@schmunk42
Copy link
Contributor Author

Will you create a package on packagist?

@cmrcx
Copy link
Owner

cmrcx commented Sep 3, 2015

Done. Thanks for reminding me.

@schmunk42
Copy link
Contributor Author

Great! Would also be nice, if you could create a 2.15 tag, since composer/packagist only reads tags, when a composer.json file is present.

@cmrcx
Copy link
Owner

cmrcx commented Sep 5, 2015

Done

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