Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Added standard bundle installation instructions#4163

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
javiereguiluz wants to merge11 commits intosymfony:masterfromjaviereguiluz:bundle_installation_instructions
Closed

Added standard bundle installation instructions#4163

javiereguiluz wants to merge11 commits intosymfony:masterfromjaviereguiluz:bundle_installation_instructions

Conversation

@javiereguiluz
Copy link
Member

QA
Doc fix?no
New docs?yes
Applies to-
Fixed tickets#4157

Note: if you think that this draft is awful, please say it so and we'll rewrite it from scratch.

@xabbuh
Copy link
Member

Basically, I like the idea and how you wrote this section. I'm not sure if it is good to place it at the bottom of the chapter though. Doesn't it belong to the "Documentation" section? I also think that it's worth to merge this into 2.3.

Copy link
Member

Choose a reason for hiding this comment

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

We need a language here. I guessmarkdown doesn't work. Can you check whether or not this renders properly when you userst?

@javiereguiluz
Copy link
MemberAuthor

@xabbuh thanks for your review! I've switched the "installation template" to a sidebar and I've used the.. raw RST directive to output the contents verbatim.

@javiereguiluz
Copy link
MemberAuthor

My main concern is this command:

$ composer require "<vendor>/<bundle-name>:dev-master"

Which version should we tell bundle creators to include in that command? Lots of them are including@stable right now.

@stof
Copy link
Member

@javiereguiluz I think the bundle doc should usecomposer require <package name> '~1' if they are in their 1.x version (you could go to a more precise requirement by giving a minimal minor version in the constraint, but this would be painful to maintain).
This would mean that bundles would have to update the installation doc only when they move to a new major version. But in such case, they already have to update their doc.

dev-master is even worse than@stable:

  • it is also unbound
  • it forbids using releases, forcing to always rely on potentially-unstable code

Copy link
Member

Choose a reason for hiding this comment

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

you should either add a note saying this is a rST template, or give also a Markdown template. Most projects are using Markdown for the readme on github.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

You are right. RST is the official format for the bundle documentation, but 99% of bundles hosted on GitHub useREADME.md instead ofREADME.rst. I've switched the template to Markdown.

Copy link
Member

Choose a reason for hiding this comment

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

well, the best practice in the doc was written at a time where symfony.com was expected to have a repository of bundles with their doc being rendered (KnpBundles appeared as a third-party solution to this problem because the official tool announced by Fabien was not yet there, and never became a reality given we then choose composer meaning that KnpBundles and Packagist can probably be enough and people can use libraries which are not bundles). The de-facto standard then became Markdown because everyone is using Github (well, mostly at least) and it used to suck at rendering rST (3 years ago when building the Symfony2 ecosystem, thecode-block directive was not supported by their rST renderer for instance) while Markdown was well rendered

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

To make myself more clear, this is what I would like to have:

doc_bundles

Copy link
Member

Choose a reason for hiding this comment

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

but..raw does not achieve this. It let you pass unprocessed context (i.e. eitherhtml orlatex or other format, which is why it asks you for a format btw: you have to provide it for each output format).
What you expect in your image is still a<pre> tag in HTML, and it is technically a code-block (so<pre><code> is more semantic).
the only difference with the rendering of..code-block is that you don't want line numbers (this is fine, Sphinx has an option to omit them in its directive) and a different background color (and this is a matter of theming) But I could totally live with the code being on a block background, and people will be able to copy-paste it.
Seehttp://symfony.com/doc/current/contributing/code/patches.html#make-a-pull-request and you will see that the code snippet containing the pull-request template can totally be copy-pasted (we did not even bothered about removing line numbers on it)

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

You are right! We just need a simple.. code-block:: text directive to output the Markdown content "as is".

Copy link
Contributor

Choose a reason for hiding this comment

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

wouldn't be "have Composer installed globally"?

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

And we could also use "to have Composer globally installed". I'm not sure what to do. We need the help of some native speaker.

Copy link
Member

Choose a reason for hiding this comment

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

I agree with@raulfraile. I would also remove everything after the comma and directly link "Composer globally installed".

@javiereguiluz
Copy link
MemberAuthor

I think it's time to make a decision:@weaverryan@wouterj@xabbuh@stof do you think that this documentation is good enough to start sending PR to all bundles' repositories during the second DX Hackday? Or do you prefer to take more time to think more about this?

Copy link
Member

Choose a reason for hiding this comment

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

"Instructions" should be upper-cased.

Copy link
Member

Choose a reason for hiding this comment

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

Add a comma after "optionally".

Copy link
Member

Choose a reason for hiding this comment

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

Thereturn statement is missing.

Copy link
Member

Choose a reason for hiding this comment

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

I usually add a// ... before this line too

Copy link
Member

Choose a reason for hiding this comment

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

If we add the return statements, I don't think that this is necessary. Usually you would simply add the new bundle at the end of the array and then return the$bundles array, won't you? So, having another placeholder there might lead to some confusion.

@javiereguiluz
Copy link
MemberAuthor

What do you think about the last change?

Original text

Use Composer to add the bundle as a new dependency of your project:    $ composer require <package-name> "~1"

Proposal

Open a command console, enter your project directory and execute thefollowing command to download the latest stable version of this bundle:    $ composer require <package-name> "~1"

@stof
Copy link
Member

@javiereguiluz You should add a note after the code block to tell authors to update the constraint according to the major version of the bundle (so that they know they should change it).
And for it to work fine, the master branch should have a branch-alias (so that the master branch can match such requirement without usingdev-master as constraint). So I would suggest adding a best practice for bundle telling they should use a branch alias (and linking tohttps://getcomposer.org/doc/articles/aliases.md)

Copy link
Member

Choose a reason for hiding this comment

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

... requires you to have Composer

@weaverryan
Copy link
Member

@javiereguiluz Sorry for the delay - my eyes weren't on the docs during the hack day. I added some comments, but then I think this is ready! I also agree with@stof's comment, but I think it should be a different section or can be a different PR altogether.

There are 2 more changes that are coming (composer/composer#3096 and thebundle:install-like command), but I think we should use this and start making PR's. Then we'll just do another update later when we have these changes :).

Thanks!

@javiereguiluz
Copy link
MemberAuthor

Should I make any other change to this PR before merging it?

@javiereguiluz
Copy link
MemberAuthor

This issue is labeled asIn progress, but I don't know what is left to be done. Any clue? Thanks!

@xabbuh
Copy link
Member

Looks fine to me. 👍

@weaverryan
Copy link
Member

@javiereguiluz I think this is Finished. Now we will also have@xabbuh's help in properly labeling things. Once it's finished, I'm looking for those so I can merge them quickly :).

BUT, your branch is missing! Do you still have it locally? If not, I'll merge via the interface. But the internal merge tool requires your branch to be there. Let me know.

Thanks!

@stof
Copy link
Member

@weaverryan the GH tool provided by Fabien does not need the branch to be there. It gets the code from the special ref available in the symfony repo for PRs, not from the branch ref in the fork.
Are you using a different tool for the doc ?

@javiereguiluz
Copy link
MemberAuthor

@weaverryan I no longer have the branch locally :(

@weaverryan
Copy link
Member

@stof, I'm using gh, and I just made sure I was on the latest version. It saysFetching javiereguiluz repository before failing when running a log onmaster..javiereguiluz/bundle_installation_instructions.

Is it possible that it doesn't grab from the docs ref when using--switch? I don't want to talk about gh here, I just want to know if I'll need to merge via the GitHub interface for this PR and if we should follow up with gh if this is a bug.

Thanks!

@wouterj
Copy link
Member

@weaverryan I'll make a PR shortly with the correct branch

@wouterj
Copy link
Member

see#4236

@javiereguiluz
Copy link
MemberAuthor

@weaverryan@stof there is nothing wrong with the tool you use. The branch is not available because I'm stupid and I deleted mysymfony-docs fork :(

@weaverryan
Copy link
Member

@javiereguiluz no worries :). Stof was saying that the tool can actually fetch the missing code from a different location (similar to what the GH merge button must do behind the scenes). But we have a new PR now, so I'll merge from there.

Thanks!

weaverryan added a commit that referenced this pull requestSep 16, 2014
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes#4236).Discussion----------Javiereguiluz bundle install instructionsReplaces#4163Commits-------7097070 Added the fixes suggested by Ryan35dddba Reworded a bit the installation instructions7a6644b Removed the sidebar and made some minor tweaks41ce2a5 Minor fixes and tweaks4b29de2 More tweaks and fixes322ec60 Removed the first person perspective and other minor fixesc39f7d3 Fixed some code formattinged96447 More improvements based on reviewers' comments21ce2c0 Fixed minor typo11db860 Applied all the fixes and suggestions made by reviewersb297d29 First draft of the bundle installation instructions
@wouterj
Copy link
Member

@javiereguiluz github always keeps branches of PRs in the main repository, in order to always show the diff of the PR (even when the branch was removed). You can fetch that by usinggit fetch origin pull/NR/head:BRANCHNAME (where NR is the number of the PR and BRANCHNAME is the name of the branch you want to use locally).

@stof
Copy link
Member

I'm using gh, and I just made sure I was on the latest version. It saysFetching javiereguiluz repository before failing when running a log onmaster..javiereguiluz/bundle_installation_instructions

This looks weird. GH does not run such commands. Are you sure you run the code from the sensiolabs/gh repo ?

@wouterj
Copy link
Member

I think fabien sent the tool to ryan back in January 2014, so I don't think it's very up to date (not sure though)

@stof
Copy link
Member

well, I know for sure that Ryan has access to the git repo to get the latest version of the tool

@weaverryan
Copy link
Member

@stof you're right - I updated locally, but was still using my old binary. So, my fault!

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

6 participants

@javiereguiluz@xabbuh@stof@weaverryan@wouterj@raulfraile

[8]ページ先頭

©2009-2025 Movatter.jp