Skip to content

Commit 9162272

Browse files
committed
Improved the "Installation" section of components
1 parent f0469d3 commit 9162272

32 files changed

+141
-102
lines changed

components/asset.rst

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,13 @@ simple. Hardcoding URLs can be a disadvantage because:
4545
Installation
4646
------------
4747

48-
You can install the component in two different ways:
48+
.. code-block:: terminal
4949
50-
* :doc:`Install it via Composer </components/using_components>` (``symfony/asset`` on `Packagist`_);
51-
* Use the official Git repository (https://github.com/symfony/asset).
50+
$ composer require symfony/asset
51+
52+
Alternatively, you can clone the `<https://github.com/symfony/asset>`_ repository.
53+
54+
.. include:: /components/require_autoload.rst.inc
5255

5356
Usage
5457
-----

components/browser_kit.rst

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,13 @@ The BrowserKit Component
1717
Installation
1818
------------
1919

20-
You can install the component in two different ways:
20+
.. code-block:: terminal
2121
22-
* :doc:`Install it via Composer </components/using_components>`
23-
(``symfony/browser-kit`` on `Packagist`_);
24-
* Use the official Git repository (https://github.com/symfony/browser-kit).
22+
$ composer require symfony/browser-kit
23+
24+
Alternatively, you can clone the `<https://github.com/symfony/browser-kit>`_ repository.
25+
26+
.. include:: /components/require_autoload.rst.inc
2527

2628
Basic Usage
2729
-----------

components/class_loader.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@ not be found by a class loader.
4141
Installation
4242
------------
4343

44-
You can install the component in 2 different ways:
44+
.. code-block:: terminal
4545
46-
* :doc:`Install it via Composer </components/using_components>` (``symfony/class-loader``
47-
on `Packagist`_);
48-
* Use the official Git repository (https://github.com/symfony/class-loader).
46+
$ composer require symfony/class-loader
47+
48+
Alternatively, you can clone the `<https://github.com/symfony/class-loader>`_ repository.
4949

5050
.. include:: /components/require_autoload.rst.inc
5151

components/config.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ The Config Component
1212
Installation
1313
------------
1414

15-
You can install the component in 2 different ways:
15+
.. code-block:: terminal
1616
17-
* :doc:`Install it via Composer </components/using_components>` (``symfony/config``
18-
on `Packagist`_);
19-
* Use the official Git repository (https://github.com/symfony/config).
17+
$ composer require symfony/config
18+
19+
Alternatively, you can clone the `<https://github.com/symfony/config>`_ repository.
2020

2121
.. include:: /components/require_autoload.rst.inc
2222

components/console.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,11 @@ other batch jobs.
1515
Installation
1616
------------
1717

18-
You can install the component in 2 different ways:
18+
.. code-block:: terminal
1919
20-
* :doc:`Install it via Composer </components/using_components>` (``symfony/console`` on `Packagist`_);
21-
* Use the official Git repository (https://github.com/symfony/console).
20+
$ composer require symfony/console
21+
22+
Alternatively, you can clone the `<https://github.com/symfony/console>`_ repository.
2223

2324
.. include:: /components/require_autoload.rst.inc
2425

components/css_selector.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,11 @@ The CssSelector Component
1010
Installation
1111
------------
1212

13-
You can install the component in 2 different ways:
13+
.. code-block:: terminal
1414
15-
* :doc:`Install it via Composer </components/using_components>` (``symfony/css-selector`` on `Packagist`_);
16-
* Use the official Git repository (https://github.com/symfony/css-selector).
15+
$ composer require symfony/css-selector
16+
17+
Alternatively, you can clone the `<https://github.com/symfony/css-selector>`_ repository.
1718

1819
.. include:: /components/require_autoload.rst.inc
1920

components/debug.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,11 @@ The Debug Component
1414
Installation
1515
------------
1616

17-
You can install the component in many different ways:
17+
.. code-block:: terminal
1818
19-
* :doc:`Install it via Composer </components/using_components>` (``symfony/debug`` on `Packagist`_);
20-
* Use the official Git repository (https://github.com/symfony/debug).
19+
$ composer require symfony/debug
20+
21+
Alternatively, you can clone the `<https://github.com/symfony/debug>`_ repository.
2122

2223
.. include:: /components/require_autoload.rst.inc
2324

components/dependency_injection.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ For an introduction to Dependency Injection and service containers see
1414
Installation
1515
------------
1616

17-
You can install the component in 2 different ways:
17+
.. code-block:: terminal
1818
19-
* :doc:`Install it via Composer </components/using_components>` (``symfony/dependency-injection``
20-
on `Packagist`_);
21-
* Use the official Git repository (https://github.com/symfony/dependency-injection).
19+
$ composer require symfony/dependency-injection
20+
21+
Alternatively, you can clone the `<https://github.com/symfony/dependency-injection>`_ repository.
2222

2323
.. include:: /components/require_autoload.rst.inc
2424

components/dom_crawler.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,11 @@ The DomCrawler Component
1515
Installation
1616
------------
1717

18-
You can install the component in 2 different ways:
18+
.. code-block:: terminal
1919
20-
* :doc:`Install it via Composer </components/using_components>` (``symfony/dom-crawler`` on `Packagist`_);
21-
* Use the official Git repository (https://github.com/symfony/dom-crawler).
20+
$ composer require symfony/dom-crawler
21+
22+
Alternatively, you can clone the `<https://github.com/symfony/dom-crawler>`_ repository.
2223

2324
.. include:: /components/require_autoload.rst.inc
2425

components/event_dispatcher.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,11 @@ event - ``kernel.response``. Here's how it works:
5252
Installation
5353
------------
5454

55-
You can install the component in 2 different ways:
55+
.. code-block:: terminal
5656
57-
* :doc:`Install it via Composer </components/using_components>`
58-
(``symfony/event-dispatcher`` on `Packagist`_);
59-
* Use the official Git repository (https://github.com/symfony/event-dispatcher).
57+
$ composer require symfony/event-dispatcher
58+
59+
Alternatively, you can clone the `<https://github.com/symfony/event-dispatcher>`_ repository.
6060

6161
.. include:: /components/require_autoload.rst.inc
6262

components/expression_language.rst

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,13 @@ The ExpressionLanguage Component
1212
Installation
1313
------------
1414

15-
You can install the component in 2 different ways:
15+
.. code-block:: terminal
1616
17-
* :doc:`Install it via Composer </components/using_components>` (``symfony/expression-language`` on `Packagist`_);
18-
* Use the official Git repository (https://github.com/symfony/expression-language).
17+
$ composer require symfony/expression-language
18+
19+
Alternatively, you can clone the `<https://github.com/symfony/expression-language>`_ repository.
20+
21+
.. include:: /components/require_autoload.rst.inc
1922

2023
How can the Expression Engine Help Me?
2124
--------------------------------------

components/filesystem.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,11 @@ The Filesystem Component
1414
Installation
1515
------------
1616

17-
You can install the component in 2 different ways:
17+
.. code-block:: terminal
1818
19-
* :doc:`Install it via Composer </components/using_components>` (``symfony/filesystem`` on `Packagist`_);
20-
* Use the official Git repository (https://github.com/symfony/filesystem).
19+
$ composer require symfony/filesystem
20+
21+
Alternatively, you can clone the `<https://github.com/symfony/filesystem>`_ repository.
2122

2223
.. include:: /components/require_autoload.rst.inc
2324

components/finder.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,11 @@ The Finder Component
1111
Installation
1212
------------
1313

14-
You can install the component in 2 different ways:
14+
.. code-block:: terminal
1515
16-
* :doc:`Install it via Composer </components/using_components>` (``symfony/finder`` on `Packagist`_);
17-
* Use the official Git repository (https://github.com/symfony/finder).
16+
$ composer require symfony/finder
17+
18+
Alternatively, you can clone the `<https://github.com/symfony/finder>`_ repository.
1819

1920
.. include:: /components/require_autoload.rst.inc
2021

components/form.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,11 @@ be from a normal form post or from an API.
1616
Installation
1717
------------
1818

19-
You can install the component in 2 different ways:
19+
.. code-block:: terminal
20+
21+
$ composer require symfony/form
2022
21-
* :doc:`Install it via Composer </components/using_components>` (``symfony/form`` on `Packagist`_);
22-
* Use the official Git repository (https://github.com/symfony/form).
23+
Alternatively, you can clone the `<https://github.com/symfony/form>`_ repository.
2324

2425
.. include:: /components/require_autoload.rst.inc
2526

components/http_foundation.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,11 @@ variables and functions by an object-oriented layer.
1919
Installation
2020
------------
2121

22-
You can install the component in 2 different ways:
22+
.. code-block:: terminal
2323
24-
* :doc:`Install it via Composer </components/using_components>` (``symfony/http-foundation`` on `Packagist`_);
25-
* Use the official Git repository (https://github.com/symfony/http-foundation).
24+
$ composer require symfony/http-foundation
25+
26+
Alternatively, you can clone the `<https://github.com/symfony/http-foundation>`_ repository.
2627

2728
.. include:: /components/require_autoload.rst.inc
2829

components/http_kernel.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,11 @@ The HttpKernel Component
1414
Installation
1515
------------
1616

17-
You can install the component in 2 different ways:
17+
.. code-block:: terminal
1818
19-
* :doc:`Install it via Composer </components/using_components>` (``symfony/http-kernel`` on Packagist_);
20-
* Use the official Git repository (https://github.com/symfony/http-kernel).
19+
$ composer require symfony/http-kernel
20+
21+
Alternatively, you can clone the `<https://github.com/symfony/http-kernel>`_ repository.
2122

2223
.. include:: /components/require_autoload.rst.inc
2324

components/intl.rst

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,13 @@ The Intl Component
2020
Installation
2121
------------
2222

23-
You can install the component in two different ways:
23+
.. code-block:: terminal
2424
25-
* :doc:`Install it via Composer</components/using_components>` (``symfony/intl`` on `Packagist`_);
26-
* Using the official Git repository (https://github.com/symfony/intl).
25+
$ composer require symfony/intl
26+
27+
Alternatively, you can clone the `<https://github.com/symfony/intl>`_ repository.
28+
29+
.. include:: /components/require_autoload.rst.inc
2730

2831
If you install the component via Composer, the following classes and functions
2932
of the intl extension will be automatically provided if the intl extension is

components/options_resolver.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,11 @@ The OptionsResolver Component
1212
Installation
1313
------------
1414

15-
You can install the component in 2 different ways:
15+
.. code-block:: terminal
1616
17-
* :doc:`Install it via Composer </components/using_components>` (``symfony/options-resolver`` on `Packagist`_);
18-
* Use the official Git repository (https://github.com/symfony/options-resolver).
17+
$ composer require symfony/options-resolver
18+
19+
Alternatively, you can clone the `<https://github.com/symfony/options-resolver>`_ repository.
1920

2021
.. include:: /components/require_autoload.rst.inc
2122

components/phpunit_bridge.rst

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,11 @@ It comes with the following features:
2525
Installation
2626
------------
2727

28-
You can install the component in 2 different ways:
28+
.. code-block:: terminal
2929
30-
* :doc:`Install it via Composer </components/using_components>`
31-
(``symfony/phpunit-bridge`` on `Packagist`_); as a dev dependency;
30+
$ composer require symfony/phpunit-bridge
3231
33-
* Use the official Git repository (https://github.com/symfony/phpunit-bridge).
32+
Alternatively, you can clone the `<https://github.com/symfony/phpunit-bridge>`_ repository.
3433

3534
.. include:: /components/require_autoload.rst.inc
3635

components/process.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,11 @@ The Process Component
1010
Installation
1111
------------
1212

13-
You can install the component in 2 different ways:
13+
.. code-block:: terminal
1414
15-
* :doc:`Install it via Composer </components/using_components>` (``symfony/process`` on `Packagist`_);
16-
* Use the official Git repository (https://github.com/symfony/process).
15+
$ composer require symfony/process
16+
17+
Alternatively, you can clone the `<https://github.com/symfony/process>`_ repository.
1718

1819
.. include:: /components/require_autoload.rst.inc
1920

components/property_access.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,11 @@ The PropertyAccess Component
1111
Installation
1212
------------
1313

14-
You can install the component in two different ways:
14+
.. code-block:: terminal
1515
16-
* :doc:`Install it via Composer</components/using_components>` (``symfony/property-access`` on `Packagist`_);
17-
* Use the official Git repository (https://github.com/symfony/property-access).
16+
$ composer require symfony/property-access
17+
18+
Alternatively, you can clone the `<https://github.com/symfony/property-access>`_ repository.
1819

1920
.. include:: /components/require_autoload.rst.inc
2021

components/psr7.rst

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,13 @@ The PSR-7 Bridge
1111
Installation
1212
------------
1313

14-
You can install the component in 2 different ways:
14+
.. code-block:: terminal
1515
16-
* :doc:`Install it via Composer </components/using_components>` (`symfony/psr-http-message-bridge on Packagist`_);
17-
* Use the official Git repository (https://github.com/symfony/psr-http-message-bridge).
16+
$ composer require symfony/psr-http-message-bridge
17+
18+
Alternatively, you can clone the `<https://github.com/symfony/psr-http-message-bridge>`_ repository.
19+
20+
.. include:: /components/require_autoload.rst.inc
1821

1922
The bridge also needs a PSR-7 implementation to allow converting HttpFoundation
2023
objects to PSR-7 objects. It provides native support for `Zend Diactoros`_.

components/require_autoload.rst.inc

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1-
Then, require the ``vendor/autoload.php`` file to enable the autoloading mechanism
2-
provided by Composer. Otherwise, your application won't be able to find the classes
3-
of this Symfony component.
1+
.. note::
2+
3+
If you install this component outside of a Symfony application, you must
4+
require the ``vendor/autoload.php`` file in your code to enable the class
5+
autoloading mechanism provided by Composer. Read
6+
:doc:`this article </components/using_components>` for more details.

components/routing.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,11 @@ The Routing Component
1111
Installation
1212
------------
1313

14-
You can install the component in 2 different ways:
14+
.. code-block:: terminal
1515
16-
* :doc:`Install it via Composer </components/using_components>` (``symfony/routing`` on `Packagist`_);
17-
* Use the official Git repository (https://github.com/symfony/routing).
16+
$ composer require symfony/routing
17+
18+
Alternatively, you can clone the `<https://github.com/symfony/routing>`_ repository.
1819

1920
.. include:: /components/require_autoload.rst.inc
2021

components/security.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,11 @@ The Security Component
1414
Installation
1515
------------
1616

17-
You can install the component in 2 different ways:
17+
.. code-block:: terminal
1818
19-
* :doc:`Install it via Composer </components/using_components>` (``symfony/security`` on Packagist_);
20-
* Use the official Git repository (https://github.com/symfony/security).
19+
$ composer require symfony/security
20+
21+
Alternatively, you can clone the `<https://github.com/symfony/security>`_ repository.
2122

2223
.. include:: /components/require_autoload.rst.inc
2324

0 commit comments

Comments
 (0)