@@ -7,15 +7,15 @@ Using Symfony Flex to Manage Symfony Applications
7
7
is not a new Symfony version, but a tool that replaces and improves the
8
8
`Symfony Installer `_ and the `Symfony Standard Edition `_.
9
9
10
- Symfony Flex **automates the most common tasks of Symfony applications **, such
11
- as installing and removing bundles and other Composer dependencies. Symfony
12
- Flex works for Symfony 3.3 and newer versions . Starting from Symfony 4.0, Flex
10
+ Symfony Flex **automates the most common tasks of Symfony applications **, like
11
+ installing and removing bundles and other Composer dependencies. Symfony
12
+ Flex works for Symfony 3.3 and higher . Starting from Symfony 4.0, Flex
13
13
should be used by default, but it is still optional.
14
14
15
15
How Does Flex Work
16
16
------------------
17
17
18
- Internally, Symfony Flex is a Composer plugin that modifies the behavior of the
18
+ Symfony Flex is a Composer plugin that modifies the behavior of the
19
19
``require ``, ``update ``, and ``remove `` commands. When installing or removing
20
20
dependencies in a Flex-enabled application, Symfony can perform tasks before
21
21
and after the execution of Composer tasks.
@@ -34,14 +34,14 @@ up installing and enabling the SwiftmailerBundle, which is the best way to
34
34
integrate Swiftmailer, the official mailer for Symfony applications.
35
35
36
36
When Symfony Flex is installed in the application and you execute ``composer
37
- require ``, the application makes a request to Symfony Flex servers before
38
- trying to install the package with Composer:
37
+ require ``, the application makes a request to the Symfony Flex server before
38
+ trying to install the package with Composer.
39
39
40
- * If there's no information about that package, Flex server returns nothing and
40
+ * If there's no information about that package, the Flex server returns nothing and
41
41
the package installation follows the usual procedure based on Composer;
42
42
43
43
* If there's special information about that package, Flex returns it in a file
44
- called "recipe" and the application uses it to decide which package to
44
+ called a "recipe" and the application uses it to decide which package to
45
45
install and which automated tasks to run after the installation.
46
46
47
47
In the above example, Symfony Flex asks about the ``mailer `` package and the
@@ -121,7 +121,7 @@ Symfony application by executing the following command:
121
121
.. note ::
122
122
123
123
The use of the Symfony Installer to create new applications is no longer
124
- recommended since Symfony 3.3. Use Composer ``create-project `` command
124
+ recommended since Symfony 3.3. Use the Composer ``create-project `` command
125
125
instead.
126
126
127
127
Upgrading Existing Applications to Flex
@@ -176,10 +176,12 @@ manual steps:
176
176
the new ``config/services.yaml `` and ``.env `` files depending on your needs.
177
177
178
178
#. Move the original source code from ``src/{App,...}Bundle/ `` to ``src/ `` and
179
- update the namespaces of every PHP file (advanced IDEs can do this
180
- automatically).
179
+ update the namespaces of every PHP file to be `` App\... `` (advanced IDEs can do
180
+ this automatically).
181
181
182
182
#. Move the original templates from ``app/Resources/views/ `` to ``templates/ ``
183
+ and ``app/Resources/translations `` to ``translations/ ``. There may be a few
184
+ other files you need to move into a new location.
183
185
184
186
#. Make any other change needed by your application. For example, if your
185
187
original ``web/app_*.php `` front controllers were customized, add those changes
0 commit comments