Skip to content

Clarification about distributing a standalone application via Packagist #450

Answered by owenvoke
osteel asked this question in Q&A
Discussion options

You must be logged in to vote

Regarding your first query, if you leave the dependencies in the require section of your composer.json, they will be installed. This is why it is recommended to move them to the require-dev (other than the php version requirement). It's also recommended to exclude unnecessary files from your built archive (so that only the Phar is included).

You can see an example of this with the Oh Dear CLI:

  • The .gitattributes excludes all content other than build/ohdear, and accompanying LICENSE.md, README.md, and composer.json
  • The composer.json defines the PHP requirement for Composer, but the other dependencies are included in -dev so that they are not included when installing globally through Composer

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@osteel
Comment options

@owenvoke
Comment options

@osteel
Comment options

Answer selected by osteel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants