@@ -20,56 +20,55 @@ 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
+ 1. 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.
25
+ .. code-block :: bash
26
+
27
+ $ php composer.phar create-project symfony/framework-standard-edition path/ 2.4.4
27
28
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:
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 `_.
31
32
32
- .. code-block :: text
33
+ 2. Your project folder will now contain files of the Symfony framework, as well
34
+ as files and folders for vendor libraries. You'll want to store your project
35
+ files in Git, but not the dependencies, since they will be managed by Composer.
36
+ You'll also want to keep your ``parameters.yml `` out of your repository as it will
37
+ contain sensitive information, such as database credentials. Furthermore,
38
+ files that are automatically created by Symfony (such as logs, caches, and dumped
39
+ assets) should be excluded as well.
33
40
34
- /web/bundles/
35
- /app/bootstrap.php.cache
36
- /app/cache/*
37
- /app/config/parameters.yml
38
- /app/logs/*
39
- !app/cache/.gitkeep
40
- !app/logs/.gitkeep
41
- /build/
42
- /vendor/
43
- /bin/
44
- /composer.phar
41
+ To help you keep these files out of your repository, Symfony comes with a file
42
+ called ``.gitignore ``. It contains a list of files and folders that Git will
43
+ ignore.
44
+
45
+ The contents of the ``.gitignore `` file that comes with the Standard Distribution
46
+ can be found in the `GitHub repository `_.
45
47
46
48
.. tip ::
47
49
48
50
You may also want to create a .gitignore file that can be used system-wide,
49
51
in which case, you can find more information here: `Github .gitignore `_
50
52
This way you can exclude files/folders often used by your IDE for all of your projects.
51
53
52
- 4 . Initialize your Git repository:
54
+ 3 . Initialize your Git repository:
53
55
54
56
.. code-block :: bash
55
57
56
58
$ git init
57
59
58
- 5 . Add all of the initial files to Git:
60
+ 4 . Add all of the initial files to Git:
59
61
60
62
.. code-block :: bash
61
63
62
64
$ git add .
63
65
64
- 6 . Create an initial commit with your started project:
66
+ 5 . Create an initial commit with your started project:
65
67
66
68
.. code-block :: bash
67
69
68
70
$ git commit -m " Initial commit"
69
71
70
- 7. Finally, download all of the third-party vendor libraries by
71
- executing Composer. For details, see :ref: `installation-updating-vendors `.
72
-
73
72
At this point, you have a fully-functional Symfony2 project that's correctly
74
73
committed to Git. You can immediately begin development, committing the new
75
74
changes to your Git repository.
@@ -116,6 +115,8 @@ manage this is `Gitolite`_.
116
115
117
116
.. _`Git` : http://git-scm.com/
118
117
.. _`Symfony2 Standard Edition` : http://symfony.com/download
118
+ .. _`Installing Symfony using Composer` : http://symfony.com/doc/current/book/installation.html#option-1-composer
119
+ .. _`GitHub repository` : https://github.com/symfony/symfony-standard/blob/master/.gitignore
119
120
.. _`git submodules` : http://git-scm.com/book/en/Git-Tools-Submodules
120
121
.. _`GitHub` : https://github.com/
121
122
.. _`barebones repository` : http://git-scm.com/book/en/Git-Basics-Getting-a-Git-Repository
0 commit comments