Skip to content

[Routing] do not install SensioFrameworkExtraBundle #9983

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 2 commits into from
Jul 24, 2018
Merged
Changes from all commits
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
14 changes: 9 additions & 5 deletions routing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,19 @@ the change is simple.
Creating Routes
---------------

First, add support for annotations via the SensioFrameworkExtraBundle:
Copy link
Contributor

Choose a reason for hiding this comment

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

This is still a requirement unless one need only routing annotation and should then depend on doctrine annotation or doctrine common as this bundle does.
We should adapt the note but we cannot remove it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This page is about routing. So why exactly is this still a requirement for routing?

Copy link
Contributor

Choose a reason for hiding this comment

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

Because the routing component or the basic skeleton don't rely on doctrine annotations by default.

Copy link
Member

Choose a reason for hiding this comment

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

I've reworded as requested by @HeahDude. Also, we don't use Flex shortcuts in the docs to make everything explicit, but we could make an exception in this case with composer require annotations

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm 👍 for the exception here. Thanks!

Copy link
Member

Choose a reason for hiding this comment

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

Why don't we require doctrine/annotations here instead?

Copy link
Member

@javiereguiluz javiereguiluz Jul 25, 2018

Choose a reason for hiding this comment

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

Although that be technically correct ... it's confusing for readers. We're in the routing chapter, one of the essential and critical chapters of the docs. It's already confusing to tell them to install annotations (because that basic feature should always be included and available in Symfony). If we tell them to install doctrine/annotations ... there will be a WTF moment. doctrine? What's this? And some people will think it's a doc error 😢

A *route* is a map from a URL path to a controller. Suppose you want one route that
matches ``/blog`` exactly and another more dynamic route that can match *any* URL
like ``/blog/my-post`` or ``/blog/all-about-symfony``.

Routes can be configured in YAML, XML and PHP. All formats provide the same
features and performance, so choose the one you prefer. If you choose PHP
annotations, run this command once in your app to add support for them:

.. code-block:: terminal

$ composer require sensio/framework-extra-bundle
$ composer require annotations

A *route* is a map from a URL path to a controller. Suppose you want one route that
matches ``/blog`` exactly and another more dynamic route that can match *any* URL
like ``/blog/my-post`` or ``/blog/all-about-symfony``:
Now you can configure the routes:

.. configuration-block::

Expand Down