Skip to content

Commit 527615c

Browse files
committed
[symfony#1899] Refactoring the workflow document about components into the components documentation
1 parent 37550da commit 527615c

File tree

5 files changed

+24
-16
lines changed

5 files changed

+24
-16
lines changed

components/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ The Components
44
.. toctree::
55
:hidden:
66

7+
using_components
78
class_loader
89
config/index
910
console/index

components/map.rst.inc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
* :doc:`/components/using_components`
2+
13
* **Class Loader**
24

35
* :doc:`/components/class_loader`

cookbook/workflow/new_project_components.rst renamed to components/using_components.rst

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
.. index::
2-
single: Workflow; Components
2+
single: Components; Installation
3+
single: Components; Usage
34

4-
How to start a new project using the Symfony2 Components
5-
========================================================
5+
How to Install and Use the Symfony2 Components
6+
==============================================
67

7-
If you're starting a new project that uses one or more Symfony2 components
8-
(or adding the components to an existing project), the easiest way to integrate
9-
everything is with Composer. Composer is smart enough to download the component(s)
10-
that you need and take care of autoloading so that you can begin using the
11-
libraries immediately.
8+
If you're starting a new project (or already have a project) that will use
9+
one or more components, the easiest way to integrate everything is with Composer.
10+
Composer is smart enough to download the component(s) that you need and take
11+
care of autoloading so that you can begin using the libraries immediately.
1212

1313
This article will take you through using the :doc:`/components/finder`, though
1414
this applies to using any component.
1515

16-
Using Finder Component
17-
----------------------
16+
Using the Finder Component
17+
--------------------------
1818

19-
**1.** Create a new empty directory for your project.
19+
**1.** If you're creating a new project, create a new empty directory for it.
2020

2121
**2.** Create a new file called ``composer.json`` and paste the following into it:
2222

@@ -31,15 +31,15 @@ Using Finder Component
3131
If you already have a ``composer.json`` file, just add this line to it. You
3232
may also need to adjust the version (e.g. ``2.1.1`` or ``2.2.*``).
3333

34-
You can research the component names and versions at _packagist.org.
34+
You can research the component names and versions at `packagist.org`_.
3535

3636
**3.** Download the vendor libraries and generate the ``vendor/autoload.php`` file:
3737

3838
.. code-block:: bash
3939
4040
$ php composer.phar install
4141
42-
4. Write your code:
42+
**4.** Write your code:
4343

4444
Once Composer has downloaded the component(s), all you need to do is include
4545
the ``vendor/autoload.php`` file that was generated by Composer. This file
@@ -69,7 +69,6 @@ immediately::
6969
"symfony/finder": "2.1.*",
7070
"symfony/dom-crawler": "2.1.*",
7171
"symfony/css-selector": "2.1.*"
72-
...
7372
}
7473
}
7574
@@ -86,4 +85,12 @@ immediately::
8685
This will include the Bundle and Bridge libraries, which you may not
8786
actually need.
8887

88+
Now What?
89+
---------
90+
91+
Now that the component is installed and autoloaded, read the specific component's
92+
documentation to find out more about how to use it.
93+
94+
And have fun!
95+
8996
.. _packagist.org: https://packagist.org/

cookbook/map.rst.inc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,5 @@
145145

146146
* :doc:`/cookbook/workflow/new_project_git`
147147
* :doc:`/cookbook/workflow/new_project_svn`
148-
* :doc:`/cookbook/workflow/new_project_components`
149148

150149
* :doc:`/cookbook/deployment-tools`

cookbook/workflow/index.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,3 @@ Workflow
66

77
new_project_git
88
new_project_svn
9-
new_project_components

0 commit comments

Comments
 (0)