Skip to content

Fixed code examples (in 2.0) #1548

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

Merged
merged 43 commits into from
Jul 14, 2012
Merged

Conversation

wouterj
Copy link
Member

@wouterj wouterj commented Jul 10, 2012

This PR continues #1531

I have merged the upstream 2.0 branch into this branch and fixed the conflicts. I think this is the right way? If it isn't, I will do it the right way (if you can tell me that).

I like to know what you think about these rules:

  • Do we use the sorthand :: or the codeblock .. code-block:: php for php code?
  • Do we put a $ before every bash line?

And maybe it is an idea to put the 'rules' in the previous PR somewhere inside contributing/documentation (with better grammar and spelling)?

wouterj added 30 commits July 5, 2012 08:58
@wouterj wouterj mentioned this pull request Jul 10, 2012
@weaverryan weaverryan merged commit 917be05 into symfony:2.0 Jul 14, 2012
@weaverryan
Copy link
Member

Hey there!

WOW, this is SUPER thorough. It's interesting to see all the small things that have accumulated over the last 18 months :) - thanks for taking the time to go through and normalize so many things.

To answer your questions:

  • :: is always preferred for PHP
  • My preference would be that we do always put $ in front of bash statements, or at least something that's standardized.

And yes, I would love to have your rules from #1531 in the docs - if you make a PR against 2.0, I'll fix up any typos/grammer stuff that there may be :)

Thank you very much!

@cursedcoder
Copy link

awesome job @wouterj !

@wouterj
Copy link
Member Author

wouterj commented Jul 15, 2012

Thank you, @cursedcoder and @weaverryan !!

I will make a new PR soon with the last fixes ($ in bash lines) and add the rules to the contributing page. Do we need to change all .. codeblock:: php to :: or is it good to use them both across the documentation?

@weaverryan
Copy link
Member

I think it's ok to have them both, we will just prefer the :: going forward. Changing them holds the risk too of messing up some code blocks and there are some cases where :: won't work :)

@wouterj
Copy link
Member Author

wouterj commented Jul 15, 2012

Ok, I will add it to rules but I will not change it in the current docs.

Do I need make a PR it against weaverryan/symfony-docs, because we still cannot make it against the symfony/symfony-docs?

@weaverryan
Copy link
Member

Actually, we found out that PR's against both seem to be broken - seems that it's anything related to symfony-docs. I'm talking with someone at GH right now about it - said they'll be looking at it ASAP, so hopefully it will be fixed soon.

For now, do the work on your local repo and we'll see if it clears up on a couple of days. You can also create an issue that references the branch on your repo - far from perfect, but I don't see another workaround.

Thanks!

@wouterj
Copy link
Member Author

wouterj commented Jul 25, 2012

Does anyone know why the overview file isn't formatted as expected, what have I done wrong? https://github.com/WouterJ/symfony-docs/blob/fixed_code_example_2/contributing/documentation/overview.rst

@weaverryan
Copy link
Member

@wouterj is this part of a different PR you're working on or do you see a formatting issue on the live site? Are you getting an error when you compile the docs?

@wouterj
Copy link
Member Author

wouterj commented Jul 25, 2012

@weaverryan thank you for you comment. It's part of the 2nd part of this PR and I cannot compile it right now, my PC doesn't have Python installed. I have to wait until tomorrow and then I am going to test it.

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.

3 participants