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

composer command line usage example in README.md #26

Closed
ole1986 opened this issue May 13, 2016 · 8 comments
Closed

composer command line usage example in README.md #26

ole1986 opened this issue May 13, 2016 · 8 comments

Comments

@ole1986
Copy link
Collaborator

ole1986 commented May 13, 2016

It is necessary to have proper explanation on how to use the composer cmdlets (incl. self installation, update pdf-php, change to experimental, etc..) in the README.md

@lsolesen
Copy link
Collaborator

lsolesen commented May 13, 2016

I think we should point to composer docs instead. Composer is widely used
and we do not provide specific info about all situations with git or manual
install.

@ole1986
Copy link
Collaborator Author

ole1986 commented May 13, 2016

mhm... but all matters on how we force ppl to use composer...
Example is in the README.md you wrote composer global require package which will install the library in ~/.composer

Following your example installation I will get stuck at the point require 'vendor/autoload.php' because the vendor folder in does not exists in my current project directory

@lsolesen
Copy link
Collaborator

lsolesen commented May 13, 2016

Lets remove the global part. That is rarely used anyways.

@ole1986
Copy link
Collaborator Author

ole1986 commented May 13, 2016

Targeting vendor/autoload.php is generally not a good idea and only works if you run the script from the correct directory. The following should serve you better:

require_once DIR.'/../vendor/autoload.php';

Questions follows: How is the global part supposed to work?

@ole1986
Copy link
Collaborator Author

ole1986 commented May 13, 2016

Yeah, I think doing it without the global thing will be best... Even I dont see much benefit of using composer because I can update at any time using git for this...

Anyways, we can add this as second "installation" concept

@lsolesen
Copy link
Collaborator

lsolesen commented May 13, 2016

You need the global in your include path. Following the example with manual
install example you also need to be in the current dir. I've used this for
PEL and never had a single question about it. But feel free to update as
you see fit.

@ole1986
Copy link
Collaborator Author

ole1986 commented May 13, 2016

I am little bit confused now

  • Your example of "installing" the pdf-php package requires the person to have a file composer.json - what they usually dont have?! how do they get this file?!
  • Also, what is the next step when they have such composer.json, do they really need to add the line "rospdf/pdf-php": "0.12.*" manually? I thought its enough to do a composer require rospdf/pdf-php - And it does not matter if I have such composer.json in my project already or not.

I know you are used to all the composer stuff and I am happy to have you on board

But please also accept that we have to write it so that everyone wont have any difficulties in understanding and installing it - either through git clone variant or composer installation

I will take care of the git clone variant btw
Thank you

@lsolesen
Copy link
Collaborator

Composer is used for dependency management for you application. I usually create the composer.json manually, and composer require will add the lines I need, but usually I edit it in manually and do composer install if it is the first time, or composer update if I updated any packages or added more packages . Other people might do it differently.

People should only install through composer, if they are familiar with composer. It should not IMHO be a guide to understand composer. I think you did great with the linking to more docs, and I think you made it clear.

I see you rewritten the composer install, so I trust that you are satisfied with it now.

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