Skip to content

Commit 0a0880c

Browse files
committed
Merge branch '2.3' into 2.5
* 2.3: Adding details about a specific version Updating component usage to use composer require Improved and fixed twig reference Conflicts: reference/twig_reference.rst
2 parents 1ae4e80 + a27238e commit 0a0880c

File tree

4 files changed

+665
-179
lines changed

4 files changed

+665
-179
lines changed

components/using_components.rst

Lines changed: 23 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -20,40 +20,39 @@ Using the Finder Component
2020

2121
**1.** If you're creating a new project, create a new empty directory for it.
2222

23-
**2.** Create a new file called ``composer.json`` and paste the following into it:
23+
**2.** Open a terminal and use Composer to grab the library.
2424

25-
.. code-block:: json
25+
.. code-block:: bash
2626
27-
{
28-
"require": {
29-
"symfony/finder": "2.3.*"
30-
}
31-
}
27+
$ composer require symfony/finder
3228
33-
If you already have a ``composer.json`` file, just add this line to it. You
34-
may also need to adjust the version (e.g. ``2.2.2`` or ``2.3.*``).
29+
The name ``symfony/finder`` is written at the top of the documentation for
30+
whatever component you want.
3531

36-
You can research the component names and versions at `packagist.org`_.
32+
.. tip::
3733

38-
**3.** `Install composer`_ if you don't already have it present on your system:
34+
If you get a command not found for ``composer``, you'll need to
35+
`Install composer`_. Depending on how you install, you may end up with
36+
a ``composer.phar`` file in your directory. In that case, no worries!
37+
Just run ``php composer.phar require symfony/finder``.
3938

40-
**4.** Download the vendor libraries and generate the ``vendor/autoload.php`` file:
39+
If you know you need a specific version of the library, add that to the command:
4140

4241
.. code-block:: bash
4342
44-
$ php composer.phar install
43+
$ composer require symfony/finder:~2.3
4544
46-
**5.** Write your code:
45+
**3.** Write your code!
4746

4847
Once Composer has downloaded the component(s), all you need to do is include
4948
the ``vendor/autoload.php`` file that was generated by Composer. This file
5049
takes care of autoloading all of the libraries so that you can use them
5150
immediately::
5251

53-
// File: src/script.php
52+
// File example: src/script.php
5453

5554
// update this to the path to the "vendor/" directory, relative to this file
56-
require_once '../vendor/autoload.php';
55+
require_once __DIR__.'../vendor/autoload.php';
5756

5857
use Symfony\Component\Finder\Finder;
5958

@@ -62,33 +61,18 @@ immediately::
6261

6362
// ...
6463

65-
.. tip::
66-
67-
If you want to use all of the Symfony Components, then instead of adding
68-
them one by one:
64+
Using all of the Components
65+
---------------------------
6966

70-
.. code-block:: json
67+
If you want to use all of the Symfony Components, then instead of adding
68+
them one by one, you can include the ``symfony/symfony`` package:
7169

72-
{
73-
"require": {
74-
"symfony/finder": "2.3.*",
75-
"symfony/dom-crawler": "2.3.*",
76-
"symfony/css-selector": "2.3.*"
77-
}
78-
}
79-
80-
you can use:
81-
82-
.. code-block:: json
70+
.. code-block:: bash
8371
84-
{
85-
"require": {
86-
"symfony/symfony": "2.3.*"
87-
}
88-
}
72+
$ composer require symfony/symfony
8973
90-
This will include the Bundle and Bridge libraries, which you may not
91-
actually need.
74+
This will also include the Bundle and Bridge libraries, which you may or
75+
may not actually need.
9276

9377
Now what?
9478
---------
@@ -100,4 +84,3 @@ And have fun!
10084

10185
.. _Composer: http://getcomposer.org
10286
.. _Install composer: http://getcomposer.org/download/
103-
.. _packagist.org: https://packagist.org/

components/yaml/introduction.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,8 @@ error if something goes wrong by adding the filename to the message.
144144
must validate the input first. Passing a filename is deprecated in
145145
Symfony 2.2, and will be removed in Symfony 3.0.
146146

147+
.. _components-yaml-dump:
148+
147149
Writing YAML Files
148150
~~~~~~~~~~~~~~~~~~
149151

cookbook/security/acl_advanced.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ tables are ordered from least rows to most rows in a typical application:
7373
with the most rows. It can contain tens of millions without significantly
7474
impacting performance.
7575

76+
.. _cookbook-security-acl-field_scope:
77+
7678
Scope of Access Control Entries
7779
-------------------------------
7880

0 commit comments

Comments
 (0)