Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork5.3k
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
Added standard bundle installation instructions#4163
Uh oh!
There was an error while loading.Please reload this page.
Conversation
xabbuh commentedAug 22, 2014
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. |
cookbook/bundles/best_practices.rst Outdated
There was a problem hiding this comment.
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 commentedAug 22, 2014
@xabbuh thanks for your review! I've switched the "installation template" to a sidebar and I've used the |
javiereguiluz commentedAug 22, 2014
My main concern is this command: Which version should we tell bundle creators to include in that command? Lots of them are including |
stof commentedAug 22, 2014
@javiereguiluz I think the bundle doc should use
|
cookbook/bundles/best_practices.rst Outdated
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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".
cookbook/bundles/best_practices.rst Outdated
There was a problem hiding this comment.
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"?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 commentedAug 22, 2014
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? |
cookbook/bundles/best_practices.rst Outdated
There was a problem hiding this comment.
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.
cookbook/bundles/best_practices.rst Outdated
There was a problem hiding this comment.
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".
cookbook/bundles/best_practices.rst Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Thereturn statement is missing.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 commentedAug 23, 2014
What do you think about the last change? Original text Proposal |
stof commentedAug 23, 2014
@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). |
cookbook/bundles/best_practices.rst Outdated
There was a problem hiding this comment.
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 commentedAug 25, 2014
@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 the Thanks! |
javiereguiluz commentedSep 1, 2014
Should I make any other change to this PR before merging it? |
javiereguiluz commentedSep 8, 2014
This issue is labeled asIn progress, but I don't know what is left to be done. Any clue? Thanks! |
xabbuh commentedSep 8, 2014
Looks fine to me. 👍 |
weaverryan commentedSep 16, 2014
@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 commentedSep 16, 2014
@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. |
javiereguiluz commentedSep 16, 2014
@weaverryan I no longer have the branch locally :( |
weaverryan commentedSep 16, 2014
@stof, I'm using gh, and I just made sure I was on the latest version. It says Is it possible that it doesn't grab from the docs ref when using Thanks! |
wouterj commentedSep 16, 2014
@weaverryan I'll make a PR shortly with the correct branch |
wouterj commentedSep 16, 2014
see#4236 |
javiereguiluz commentedSep 16, 2014
@weaverryan@stof there is nothing wrong with the tool you use. The branch is not available because I'm stupid and I deleted my |
weaverryan commentedSep 16, 2014
@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! |
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 commentedSep 16, 2014
@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 using |
stof commentedSep 16, 2014
This looks weird. GH does not run such commands. Are you sure you run the code from the sensiolabs/gh repo ? |
wouterj commentedSep 16, 2014
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 commentedSep 16, 2014
well, I know for sure that Ryan has access to the git repo to get the latest version of the tool |
weaverryan commentedOct 1, 2014
@stof you're right - I updated locally, but was still using my old binary. So, my fault! |

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