-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Improving "The Quick Tour" tutorial #3562
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
Changes from 1 commit
0b442c7
6e5a6a2
63f671c
8a1db94
b6c1721
7c8c38c
be8787c
3a2fd71
f48cbf1
905e3e6
cce8145
1e1deb0
f57ad39
0d4da93
deced02
53ba9d5
4a4635d
89c7dd3
bd1fc95
7cfc1d9
a22d663
9f04dae
f810f4a
cef3103
1ed3dc9
c7d3fac
fa1d018
304d4ce
3b430f8
c911698
ef88ae2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,8 +9,8 @@ Installing Symfony2 | |
------------------- | ||
|
||
First, check that the PHP version installed on your computer meets the Symfony2 | ||
requirements: 5.3.3 or higher. Then, open a command console and execute the | ||
following command to install the latest version of Symfony2 in the ``myproject/`` | ||
requirements: 5.3.3 or higher. Then, open a console and execute the following | ||
command to install the latest version of Symfony2 in the ``myproject/`` | ||
directory: | ||
|
||
.. code-block:: bash | ||
|
@@ -145,7 +145,7 @@ will be executed. In the next section, you'll learn exactly what that means. | |
|
||
.. tip:: | ||
|
||
In addition to YAML format, routes can be configured in XML or PHP files | ||
In addition to YAML files, routes can be configured in XML or PHP files | ||
and even embedded in PHP annotations. This flexibility is one of the main | ||
features of Symfony2, a framework that never imposes you a particular | ||
configuration format. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. configuration format -> format (it's not only flexible with config formats) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As this There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. a framework that never imposes a particular configuration format on you. |
||
|
@@ -162,7 +162,7 @@ controller might create the response by hand, based on the request:: | |
|
||
use Symfony\Component\HttpFoundation\Response; | ||
|
||
$name = $request->query->get('name'); | ||
$name = $request->get('name'); | ||
|
||
return new Response('Hello '.$name); | ||
|
||
|
@@ -322,11 +322,13 @@ environment. | |
|
||
.. _quick-tour-big-picture-environments-intro: | ||
|
||
So what *is* an environment? An :term:`Environment` is a simple string (e.g. | ||
``dev`` or ``prod``) that represents a group of configuration that's used | ||
to run your application. | ||
So what *is* an environment? An :term:`Environment` represents a group of | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would put a new headline before this paragraph |
||
configuration that's used to run your application. Symfony2 defines by default | ||
two environments: ``dev`` (suited for when developing the application locally) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Symfony2 defines two evironments by default: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it actually defines 3: dev, prod and test There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You are right, but as we don't mention tests on this quick tour, I guess it's a fair concession if we forget about the special |
||
and ``prod`` (optimized for when executing the application on production). | ||
|
||
Typically, you put your common configuration in ``config.yml`` and override | ||
Typically, the environments share a large amount of configuration options. For | ||
that reason, you put your common configuration in ``config.yml`` and override | ||
where necessary in the specific configuration file for each environment: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd move |
||
|
||
.. code-block:: yaml | ||
|
@@ -340,8 +342,8 @@ where necessary in the specific configuration file for each environment: | |
intercept_redirects: false | ||
|
||
In this example, the ``dev`` environment loads the ``config_dev.yml`` configuration | ||
file, which itself imports the global ``config.yml`` file and then modifies it by | ||
enabling the web debug toolbar. | ||
file, which itself imports the common ``config.yml`` file and then modifies it | ||
by enabling the web debug toolbar. | ||
|
||
When you visit the ``app_dev.php`` file in your browser, you're executing | ||
your Symfony application in the ``dev`` environment. To visit your application | ||
|
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.
[...] and can even be embedded [...]