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

Format the possible version formats as a table #2302

Merged
merged 2 commits into from Oct 15, 2013

Conversation

igorw
Copy link
Contributor

@igorw igorw commented Oct 1, 2013

Note I: This syntax is supported by MarkdownExtra, which both getcomposer
and github are using.

Note II: This patch currently breaks the PDF, because pandoc does not like
non-standard markdown tables. Ideas for fixing this appreciated.

Note III: The idea for this patch came up a few weeks ago on IRC. We
agreed back then that a table would be a good idea.

Note IV: This patch creates a stability section which opens the door for
finally documenting how stability works in the composer docs.


With this patch applied to getcomposer, the result looks as follows:

screen shot 2013-10-02 at 1 12 07 am

Note I: This syntax is supported by MarkdownExtra, which both getcomposer
and github are using.

Note II: This patch currently breaks the PDF, because pandoc does not like
non-standard markdown tables. Ideas for fixing this appreciated.

Note III: The idea for this patch came up a few weeks ago on IRC. We
agreed back then that a table would be a good idea.

Note IIII: This patch creates a stability section which opens the door for
finally documenting how stability works in the composer docs.
@stof
Copy link
Contributor

stof commented Oct 2, 2013

While reviewing this PR, I figured that this section misses the documentation for OR between constraints (by separating them with a | instead of a comma)

@igorw
Copy link
Contributor Author

igorw commented Oct 2, 2013

Does composer take care of precedence?

@stof
Copy link
Contributor

stof commented Oct 2, 2013

@igorw Yes. If you combine | and ,, it first explodes the OR condition, making >= 1.0, <1.1 | ~1.2 parsed as if it was (>= 1.0, <1.1) | ~1.2 (except that braces are not allowed in constraints)

@igorw
Copy link
Contributor Author

igorw commented Oct 2, 2013

Added docs for logical OR.

Name | Example | Description
-------------- | --------------------- | -----------
Exact version | `1.0.2` | You can specify the exact version of a package.
Range | `>=1.0` `>=1.0,<2.0` `>=1.0,<1.1 | >=1.2` | By using comparison operators you can specify ranges of valid versions. Valid operators are `>`, `>=`, `<`, `<=`, `!=`. <br />You can define multiple ranges, separated by a comma, which will be treated as a **logical AND**. A pipe symbol `|` will be treated as a **logical OR**. <br />AND has higher precedence than OR.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should AND and OR really be documented in the Range constraint ? It could be used for any constraints, like for instance a OR between 2 wildcards

@igorw
Copy link
Contributor Author

igorw commented Oct 9, 2013

The new version of pandoc supports tables, but the longtable is too wide an goes over the edge. LaTeX wizard help needed to typeset basic table.

@igorw
Copy link
Contributor Author

igorw commented Oct 15, 2013

After composer/getcomposer.org#55 is merged, this can be merged too.

@igorw
Copy link
Contributor Author

igorw commented Oct 15, 2013

FWIW, here's what the PDF looks like:

screen shot 2013-10-15 at 6 31 41 pm

naderman added a commit that referenced this pull request Oct 15, 2013
Format the possible version formats as a table
@naderman naderman merged commit 2f4a3ab into composer:master Oct 15, 2013
digitalkaoz pushed a commit to digitalkaoz/composer that referenced this pull request Nov 22, 2013
Format the possible version formats as a table
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

Successfully merging this pull request may close these issues.

None yet

3 participants