-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
First import of the "Official Best Practices" book #4327
First import of the "Official Best Practices" book #4327
Conversation
=============================== | ||
|
||
.. toctree:: | ||
:hidden: |
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 don't hide them on the index pages
|
||
This guide is **specially suited** for: | ||
|
||
* Websites and web applications developed with the full-stack Symfony framework. |
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 would add "Non decoupled websites and web applications developed with the full-stack Symfony framework" here, since that's where it's about.
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.
👍
|
@wouterj the Travis build is failing because the |
@javiereguiluz you need to update the submodule to point to a commit with the new directive included |
@stof thanks for pointing me about how to solve this problem. Let's see if Travis is happy now. |
This is the latest message error reported by Travis. Any help is really appreciated:
|
@javiereguiluz try running the build locally to see the full stack trace |
@stof thanks again for the advice. I've finally been able to track the error and I've successfully solved it locally. A new PR has been created (fabpot/sphinx-php#22) and once it's merged, I'll try to update the submodule of this repo to see if it works. |
IMO "Official" should be changed to "SensioLabs". And then i would not have any objections to the content or recommendations in the book. "Official: relating to an authority or public body and its activities and responsibilities." and i like to think the public body and authority is the community (even though Fabien have the absolute last say), and the community as a whole have not created these. |
👍 |
``::layout.html.twig`` ``layout.html.twig`` | ||
``AcmeDemoBundle::index.html.twig`` ``index.html.twig`` | ||
``AcmeDemoBundle:Default:subdir/index.html.twig`` ``default/subdir/index.html.twig`` | ||
``AcmeDemoBundle:Default/subdir:index.html.twig`` ``default/subdir/index.html.twig`` |
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.
These should use the new notation @AcmeDemo/Default/index.html.twig
etc.
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 don't think we should use the new notation because all the Symfony documentation, blog posts, talks, etc. use the traditional notation. Therefore, all Symfony developers know the traditional notation and only a small set of developers know the new notation.
@henrikbjorn @krunoknego we think that your proposal is right. We have reworded a paragraph in the introduction. Now these are the "Symfony best practices" instead of the "Official Symfony best practices". We haven't updated the symfony.com/best-practices page because once this book is published, that page will be gone forever. If the community creates their own set of recommendations, we'll call them "Community Best Practices" or "Symfony Community Best Practices" or something like that. |
@javiereguiluz You can update the submodule reference to point to |
👍 |
thanks @xabbuh! It looks like everything works now as expected. |
Thanks for everyone's feedback! We'll keep moving forward from here :). |
…iereguiluz) This PR was merged into the 2.3 branch. Discussion ---------- First import of the "Official Best Practices" book As promised, this Pull Request adds the source files of the new "Official Best Practices" book recently published at symfony.com/best-practices. Similarly to any other Symfony documentation, the community is allowed, and even encouraged, to propose improvements and fixes to this document. However, given the special nature of this document, we'd like to clarify what proposals will be accepted and what proposals will not. **The following will be happily accepted:** * Typos and grammar fixes. * Objective errors (errors in code, technical arguments that are irrelevant or wrong, etc.) * Rewordings and simplifications of confusing explanations. * Proposals to add new best practices not covered so far. **The following will not make it:** * Complete rewriting of the existing best practices (for instance, a proposal to change *"use annotations ..."* to *"don't use annotations ..."* won't be accepted) Before some of you get mad at us, please let us explain the purpose of this book. The "Official Symfony Best Practices" explains the recommendations that the original creator of Symfony thinks you should follow to develop web applications. When we talk about opinions instead of facts, it's really hard to tell when someone is wrong. For instance, who of the following developers you think is wrong? * *Developer A*: you should not use annotations. They may be convenient for this and that, but they have these other problems. * *Developer B*: you should use annotations. They may have these problems, but it's worth it because of this and that convenience. For us, both opinions are valid, in the sense that they are not promoting universal truths. It's perfectly fine to think that annotations are good and/or bad. This is the reason why this book is not about the creator of Symfony thinking that he is smarter than all of us. And this is definitely not the list of perfect practices or mandatory practices. This is just an opinionated list of recommendations by the original creator of Symfony. If you happen to follow them (all or some) that's fine. If you don't want to follow them or even if you think that they are wrong, that's perfectly fine too. Let us make it clear again: this is not a list of universal truths or mandatory practices. This is just a list of opinions about how to do things. Follow them or not at your will. If the Symfony community wants to create their own set of "community best practices", that's great! That way, people will have more best practices to choose from and more information to make better decisions. We really hope things are more clear now. If not, please comment us your concerns and we'll better explain things for you. ------ Speaking from a strictly technical point of view, I'd like to warn documentation maintainers (@weaverryan, @wouterj and @xabbuh) that I have no idea about the process to follow when adding a new book to the Symfony documentation. The things that for sure are not going to work right now are the following: * On `symfony.com` we don't have the CSS style to display the best practices. We'll add it really soon to match the style of the existing PDF file. * On `symfony.com` the URL `http://symfony.com/doc/current/best_practices/index.html` now displays a regular web page. Once this book is added to the documentaton pipeline, we'll remove that page to show instead the index of this book. * The PDF generation for this book isn't prepared yet, so we'll have to wait a few days to set everything up. Commits ------- 7eb9367 Updated the sphinx submodule to ad support for best-practice directive d001da8 Fixed some typos reported by @henrikbjorn d12cfe5 Renamed "official best practices" to "best practices" af6b70b added the missing "best-practice" directive import in Sphinx configuration 30b9c45 updated fabpot/sphinx-php module reference f100fc0 Added an index directive to the first chapter d317925 Fixed some technical problems as suggested by Wouter 2c2000a first import of the "Official Best Practices" book
As promised, this Pull Request adds the source files of the new "Official Best Practices" book recently published at symfony.com/best-practices.
Similarly to any other Symfony documentation, the community is allowed, and even encouraged, to propose improvements and fixes to this document. However, given the special nature of this document, we'd like to clarify what proposals will be accepted and what proposals will not.
The following will be happily accepted:
The following will not make it:
Before some of you get mad at us, please let us explain the purpose of this book. The "Official Symfony Best Practices" explains the recommendations that the original creator of Symfony thinks you should follow to develop web applications.
When we talk about opinions instead of facts, it's really hard to tell when someone is wrong. For instance, who of the following developers you think is wrong?
For us, both opinions are valid, in the sense that they are not promoting universal truths. It's perfectly fine to think that annotations are good and/or bad.
This is the reason why this book is not about the creator of Symfony thinking that he is smarter than all of us. And this is definitely not the list of perfect practices or mandatory practices. This is just an opinionated list of recommendations by the original creator of Symfony. If you happen to follow them (all or some) that's fine. If you don't want to follow them or even if you think that they are wrong, that's perfectly fine too.
Let us make it clear again: this is not a list of universal truths or mandatory practices. This is just a list of opinions about how to do things. Follow them or not at your will.
If the Symfony community wants to create their own set of "community best practices", that's great! That way, people will have more best practices to choose from and more information to make better decisions.
We really hope things are more clear now. If not, please comment us your concerns and we'll better explain things for you.
Speaking from a strictly technical point of view, I'd like to warn documentation maintainers (@weaverryan, @wouterj and @xabbuh) that I have no idea about the process to follow when adding a new book to the Symfony documentation.
The things that for sure are not going to work right now are the following:
symfony.com
we don't have the CSS style to display the best practices. We'll add it really soon to match the style of the existing PDF file.symfony.com
the URLhttp://symfony.com/doc/current/best_practices/index.html
now displays a regular web page. Once this book is added to the documentaton pipeline, we'll remove that page to show instead the index of this book.