8000 minor #6239 Remove app_dev as build-in server is used (rmed19, WouterJ) · symfony/symfony-docs@3aff5e1 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3aff5e1

Browse files
committed
minor #6239 Remove app_dev as build-in server is used (rmed19, WouterJ)
This PR was merged into the 2.3 branch. Discussion ---------- Remove app_dev as build-in server is used Finishes/replaces #5612 | Q | A | ------------- | --- | Doc fix? | yes | New docs? | no | Applies to | 2.3+ | Fixed tickets | #5611 Commits ------- 6dfeb9a Remove app_dev.php as buildin server is used 51659f1 internal web server ran with dev environment by default
2 parents d46b458 + 6dfeb9a commit 3aff5e1

File tree

2 files changed

+16
-19
lines changed

2 files changed

+16
-19
lines changed

book/configuration.rst

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ format you prefer:
8787
8888
.. note::
8989

90-
You'll learn exactly how to load each file/format in the next section
91-
`Environments`_.
90+
You'll learn exactly how to load each file/format in the next section
91+
`Environments`_.
9292

9393
Each top-level entry like ``framework`` or ``twig`` defines the configuration
9494
for a particular bundle. For example, the ``framework`` key defines the configuration
@@ -122,13 +122,13 @@ FrameworkBundle configuration:
122122

123123
.. code-block:: bash
124124
125-
$ app/console config:dump-reference FrameworkBundle
125+
$ php app/console config:dump-reference FrameworkBundle
126126
127127
The extension alias (configuration key) can also be used:
128128

129129
.. code-block:: bash
130130
131-
$ app/console config:dump-reference framework
131+
$ php app/console config:dump-reference framework
132132
133133
.. note::
134134

@@ -195,6 +195,12 @@ cached files and allow them to rebuild:
195195
be accessed directly through the browser. See the :doc:`testing chapter </book/testing>`
196196
for more details.
197197

198+
.. tip::
199+
200+
When using the ``server:run`` command to start a server,
201+
``http://localhost:8000/`` will use the dev front controller of your
202+
application.
203+
198204
.. index::
199205
single: Environments; Configuration
200206

book/page_creation.rst

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,12 @@ a method inside of it that will be executed when someone goes to ``/lucky/number
5959

6060
Before diving into this, test it out!
6161

62-
http://localhost:8000/app_dev.php/lucky/number
62+
http://localhost:8000/lucky/number
6363

6464
.. tip::
6565

66-
If you setup a proper virtual host in :doc:`Apache or Nginx </cookbook/configuration/web_server_configuration>`,
66+
If you setup a proper virtual host in
67+
:doc:`Apache or Nginx </cookbook/configuration/web_server_configuration>`,
6768
replace ``http://localhost:8000`` with your host name - like
6869
``http://symfony.dev/app_dev.php/lucky/number``.
6970

@@ -80,16 +81,6 @@ and is where you build the page. The only rule is that a controller *must*
8081
return a Symfony :ref:`Response <component-http-foundation-response>` object
8182
(and you'll even learn to bend this rule eventually).
8283

83-
.. sidebar:: What's the ``app_dev.php`` in the URL?
84-
85-
Great question! By including ``app_dev.php`` in the URL, you're executing
86-
Symfony through a file - ``web/app_dev.php`` - that boots it in the ``dev``
87-
environment. This enables great debugging tools and rebuilds cached
88-
files automatically. For production, you'll use clean URLs - like
89-
``http://localhost:8000/lucky/number`` - that execute a different file -
90-
``app.php`` - that's optimized for speed. To learn more about this and
91-
environments, see :ref:`book-page-creation-prod-cache-clear`.
92-
9384
Creating a JSON Response
9485
~~~~~~~~~~~~~~~~~~~~~~~~
9586

@@ -126,7 +117,7 @@ Just add a second method to ``LuckyController``::
126117

127118
Try this out in your browser:
128119

129-
http://localhost:8000/app_dev.php/api/lucky/number
120+
http://localhost:8000/api/lucky/number
130121

131122
You can even shorten this with the handy :class:`Symfony\\Component\\HttpFoundation\\JsonResponse`::
132123

@@ -247,7 +238,7 @@ The best part is that you can access this value and use it in your controller::
247238

248239
Try it by going to ``/lucky/number/XX`` - replacing XX with *any* number:
249240

250-
http://localhost:8000/app_dev.php/lucky/number/7
241+
http://localhost:8000/lucky/number/7
251242

252243
You should see *7* lucky numbers printed out! You can get the value of any
253244
``{placeholder}`` in your route by adding a ``$placeholder`` argument to
@@ -404,7 +395,7 @@ to put the content into the middle of the ``base.html.twig`` layout.
404395

405396
Refresh to see your template in action!
406397

407-
http://localhost:8000/app_dev.php/lucky/number/9
398+
http://localhost:8000/lucky/number/9
408399

409400
If you view the source code, you now have a basic HTML structure thanks to
410401
``base.html.twig``.

0 commit comments

Comments
 (0)
0