Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8ffb8a8

Browse files
author
Fabrice Bernhard
committed
Contribution to symfony 1 to Symfony2 :
- Create a new project - Console - Modules - Plugins To be continued
1 parent 5124dcd commit 8ffb8a8

File tree

1 file changed

+31
-6
lines changed

1 file changed

+31
-6
lines changed

guides/symfony1.rst

Lines changed: 31 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Symfony2 for symfony 1 users
55
Create a new project
66
--------------------
77

8-
In a symfony 1 environment, to create a new project, you used the global "symfony" executable, or the one contained in the data/bin folder of the symfony1 source:
8+
In a symfony 1 environment, to create a new project, you use the global "symfony" executable, or the one contained in the data/bin folder of the symfony1 source:
99

1010
.. code-block::
1111
@@ -14,16 +14,24 @@ In a symfony 1 environment, to create a new project, you used the global "symfon
1414
cd mynewproject
1515
php ../symfony1/data/bin/symfony generate:project mynewproject
1616
17-
In Symfony2, to create a new project you need to use the symfony bootstrapper:
17+
In Symfony2, to create a new project you need to install the symfony bootstrapper first:
1818

1919
.. code-block::
2020
2121
git clone git://github.com/symfony/symfony-bootstrapper.git
22+
cd symfony-bootstraper/src
23+
sh ../bin/install_vendors.sh
24+
cd ../../
25+
26+
And then use it to create your project. Note that the default format for configuration files is now ```xml```, so if you want to keep the ```yml``` format to which you are used to in symfony 1, you need to specifiy it:
27+
28+
.. code-block::
29+
2230
mkdir mynewproject
2331
cd mynewproject
24-
php ../symfony-bootstrapper/symfony.phar init --name=mynewproject
32+
php ../symfony-bootstrapper/symfony.phar init --format=yml --name=mynewproject
2533
26-
and you will have to link all external libraries yourself:
34+
Finally you now have multiple external libraries to include in your project. To avoid downloading them for every new project, you can use a symbolic link:
2735

2836
.. code-block::
2937
@@ -34,7 +42,7 @@ and you will have to link all external libraries yourself:
3442
Use the console
3543
---------------
3644

37-
In symfony 1, the console was directly in the base directory and was called ```symfony```:
45+
In symfony 1, the console is directly in the base directory and is called ```symfony```:
3846

3947
.. code-block::
4048
@@ -65,4 +73,21 @@ different semantic configurations, separate routing configurations, and so on.
6573
.. tip::
6674

6775
Read the definition of a :term:`Project`, an :term:`Application`, and a
68-
:term:`Bundle` in the glossary.
76+
:term:`Bundle` in the glossary.
77+
78+
79+
80+
Bundles
81+
-------
82+
83+
In a symfony 1 project, you usually have multiple modules inside your application. A module is a coherent set of controllers and templates.
84+
85+
In a Symfony2 project, you replace the concept of modules with Bundles.
86+
87+
88+
Plugins
89+
-------
90+
91+
In a symfony 1 project, you usually download a lot of useful plugins to reuse the many functionalities developed by the community.
92+
93+
In a Symfony2 project, you download Bundles. There are not many differences between the "module" Bundles and the "plugin" Bundles, except that a "plugin" Bundle usually contains multiple "module" Bundles using the "category namespace".

0 commit comments

Comments
 (0)