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

Added mentions to some popular (and useful) Symfony bundles #5373

Merged
merged 4 commits into from
Jun 19, 2015
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion book/security.rst
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,11 @@ But who can you login as? Where do users come from?
What other methods are supported? See the :doc:`Configuration Reference </reference/configuration/security>`
or :doc:`build your own </cookbook/security/custom_authentication_provider>`.

.. tip::

If your application logs in users via a third-party service such as Google,
Copy link
Member

Choose a reason for hiding this comment

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

[...] logs users in [...]

Facebook or Twitter, check out the `HWIOAuthBundle`_ community bundle.
Copy link
Member

Choose a reason for hiding this comment

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

this bundle is abotu OAuth authentication. this is not specific to Twitter, Facebook or Google only. The wording should be improved

Copy link
Member Author

Choose a reason for hiding this comment

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

I disagree. I think that mentioning Google, Facebook and Twitter explicitly is the best way to explain the purpose of this bundle.


.. _security-user-providers:
.. _where-do-users-come-from-user-providers:

Expand Down Expand Up @@ -480,7 +485,7 @@ else, you'll want to encode their passwords. The best algorithm to use is
<encoder class="Symfony\Component\Security\Core\User\User"
algorithm="bcrypt"
cost="12" />

<!-- ... -->
</config>
</srv:container>
Expand Down Expand Up @@ -1283,3 +1288,4 @@ Learn More from the Cookbook

.. _`online tool`: https://www.dailycred.com/blog/12/bcrypt-calculator
.. _`frameworkextrabundle documentation`: http://symfony.com/doc/current/bundles/SensioFrameworkExtraBundle/index.html
.. _`HWIOAuthBundle`: https://github.com/hwi/HWIOAuthBundle
8 changes: 8 additions & 0 deletions cookbook/assetic/asset_management.rst
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,12 @@ To include an image you can use the ``image`` tag.
You can also use Assetic for image optimization. More information in
:doc:`/cookbook/assetic/jpeg_optimize`.

.. tip::

Instead of using Assetic to include images, you may consider using the
`LiipImagineBundle`_ community bundle, which allows to compress and
manipulate images (rotate, resize, watermark, etc.) before serving them.

.. _cookbook-assetic-cssrewrite:

Fixing CSS Paths with the ``cssrewrite`` Filter
Expand Down Expand Up @@ -572,3 +578,5 @@ some isolated directory (e.g. ``/js/compiled``), to keep things organized:
) as $url): ?>
<script src="<?php echo $view->escape($url) ?>"></script>
<?php endforeach ?>

.. _`LiipImagineBundle`: http://knpbundles.com/liip/LiipImagineBundle
Copy link
Member

Choose a reason for hiding this comment

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

why linking to knpbundles here while other places are linking to github ?

Copy link
Member Author

Choose a reason for hiding this comment

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

You are right. Fixed. Thanks.

6 changes: 6 additions & 0 deletions cookbook/assetic/jpeg_optimize.rst
Original file line number Diff line number Diff line change
Expand Up @@ -250,4 +250,10 @@ file:
),
));

.. tip::

Instead of using Assetic and Jpegoptim, you can also compress and manipulate
images before serving them using the `LiipImagineBundle`_ community bundle.
Copy link
Member

Choose a reason for hiding this comment

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

Imagine will not perform the optimization for you. and this article is precisely about Assetic, so the note is misleading.

btw, compressing images dynamically instead of compressing them during the asset dumping is a bad idea for performance (the LiipImagineBundle use case is for images uploaded by users which then need to be manipulated, not really for your assets, while Assetic is about your assets)


.. _`Jpegoptim`: http://www.kokkonen.net/tjko/projects.html
.. _`LiipImagineBundle`: http://knpbundles.com/liip/LiipImagineBundle
8 changes: 8 additions & 0 deletions cookbook/doctrine/file_uploads.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@
How to Handle File Uploads with Doctrine
========================================

.. note::

Instead of handling file uploading yourself, you may consider using the
`VichUploaderBundle`_ community bundle. This bundle provides all the common
operations (such as file renaming, saving and deleting) and it's tightly
integratd with Doctrine ORm, ODM, PHPCR ODM and Propel.
Copy link
Member

Choose a reason for hiding this comment

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

typo: integrated.

And ORM should be all uppercase.
And ODM should be replaced by MongoDB ODM (there are several Doctrine ODMs)


Handling file uploads with Doctrine entities is no different than handling
any other file upload. In other words, you're free to move the file in your
controller after handling a form submission. For examples of how to do this,
Expand Down Expand Up @@ -557,3 +564,4 @@ order to remove the file. Before it's removed, you must store the file path
from the database, you can safely delete the file (in ``PostRemove``).

.. _`preUpdate`: http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/events.html#preupdate
.. _`VichUploaderBundle`: https://github.com/dustin10/VichUploaderBundle
10 changes: 9 additions & 1 deletion cookbook/security/custom_authentication_provider.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@
How to Create a custom Authentication Provider
==============================================

.. note::

If you want to authenticate users via OAuth using a third-party service
such as Google, Facebook or Twitter, there is no need to create your own
authentication provider. In those cases, use the `HWIOAuthBundle`_ community
bundle.

If you have read the chapter on :doc:`/book/security`, you understand the
distinction Symfony makes between authentication and authorization in the
implementation of security. This chapter discusses the core classes involved
Expand Down Expand Up @@ -280,7 +287,7 @@ the ``PasswordDigest`` header value matches with the user's password.

.. note::

The comparsion of the expected and the provided digests uses a constant
The comparison of the expected and the provided digests uses a constant
time comparison provided by the
:method:`Symfony\\Component\\Security\\Core\\Util\\StringUtils::equals`
method of the ``StringUtils`` class. It is used to mitigate possible
Expand Down Expand Up @@ -615,6 +622,7 @@ set to any desirable value per firewall.
The rest is up to you! Any relevant configuration items can be defined
in the factory and consumed or passed to the other classes in the container.

.. _`HWIOAuthBundle`: https://github.com/hwi/HWIOAuthBundle
.. _`WSSE`: http://www.xml.com/pub/a/2003/12/17/dive.html
.. _`nonce`: http://en.wikipedia.org/wiki/Cryptographic_nonce
.. _`timing attacks`: http://en.wikipedia.org/wiki/Timing_attack