@@ -20,51 +20,51 @@ Initial Project Setup
20
20
To get started, you'll need to download Symfony and initialize your local
21
21
git repository:
22
22
23
- 1 . Download the `Symfony2 Standard Edition `_ without vendors.
23
+ # . Download the `Symfony2 Standard Edition `_ using Composer:
24
24
25
- 2. Unzip/untar the distribution. It will create a folder called Symfony with
26
- your new project structure, config files, etc. Rename it to whatever you like.
27
-
28
- 3. Create a new file called ``.gitignore `` at the root of your new project
29
- (e.g. next to the ``composer.json `` file) and paste the following into it. Files
30
- matching these patterns will be ignored by Git:
31
-
32
- .. code-block :: text
33
-
34
- /web/bundles/
35
- /app/bootstrap*
36
- /app/cache/*
37
- /app/logs/*
38
- /vendor/
39
- /app/config/parameters.yml
25
+ .. code-block :: bash
40
26
41
- .. tip ::
27
+ $ php composer.phar create-project symfony/framework-standard-edition path/ ~ 2.3
42
28
43
- You may also want to create a .gitignore file that can be used system-wide,
44
- in which case, you can find more information here: ` Github .gitignore `_
45
- This way you can exclude files/folders often used by your IDE for all of your projects .
29
+ Composer will now download the Standard Distribution along with all of the
30
+ required vendor libraries. For more information about downloading Symfony using
31
+ Composer, see ` Installing Symfony using Composer `_ .
46
32
47
- 4 . Initialize your Git repository:
33
+ # . Initialize your Git repository:
48
34
49
35
.. code-block :: bash
50
36
51
37
$ git init
52
38
53
- 5 . Add all of the initial files to Git:
39
+ # . Add all of the initial files to Git:
54
40
55
41
.. code-block :: bash
56
42
57
43
$ git add .
58
44
59
- 6. Create an initial commit with your started project:
45
+ .. tip ::
46
+
47
+ As you might have noticed, not all files that were downloaded by Composer in step 1,
48
+ have been staged for commit by Git. Certain files and folders, such as the project's
49
+ dependencies (which are managed by Composer), ``parameters.yml `` (which contains sensitive
50
+ information such as database credentials), log and cache files and dumped assets (which are
51
+ created automatically by your project), should not be committed in Git. To help you prevent
52
+ committing those files and folders by accident, the Standard Distribution comes with a
53
+ file called ``.gitignore ``, which contains a list of files and folders that Git should
54
+ ignore.
55
+
56
+ .. tip ::
57
+
58
+ You may also want to create a ``.gitignore `` file that can be used system-wide.
59
+ This allows you to exclude files/folders for all your projects that are created by
60
+ your IDE or operating system. For details, see `Github .gitignore `_.
61
+
62
+ #. Create an initial commit with your started project:
60
63
61
64
.. code-block :: bash
62
65
63
66
$ git commit -m " Initial commit"
64
67
65
- 7. Finally, download all of the third-party vendor libraries by
66
- executing Composer. For details, see :ref: `installation-updating-vendors `.
67
-
68
68
At this point, you have a fully-functional Symfony2 project that's correctly
69
69
committed to Git. You can immediately begin development, committing the new
70
70
changes to your Git repository.
@@ -111,6 +111,7 @@ manage this is `Gitolite`_.
111
111
112
112
.. _`Git` : http://git-scm.com/
113
113
.. _`Symfony2 Standard Edition` : http://symfony.com/download
114
+ .. _`Installing Symfony using Composer` : http://symfony.com/doc/current/book/installation.html#option-1-composer
114
115
.. _`git submodules` : http://git-scm.com/book/en/Git-Tools-Submodules
115
116
.. _`GitHub` : https://github.com/
116
117
.. _`barebones repository` : http://git-scm.com/book/en/Git-Basics-Getting-a-Git-Repository
0 commit comments