Skip to content

Improved the "Installation" section of components #9418

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions components/asset.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,13 @@ simple. Hardcoding URLs can be a disadvantage because:
Installation
------------

You can install the component in two different ways:
.. code-block:: terminal

* :doc:`Install it via Composer </components/using_components>` (``symfony/asset`` on `Packagist`_);
* Use the official Git repository (https://github.com/symfony/asset).
$ composer require symfony/asset

Alternatively, you can clone the `<https://github.com/symfony/asset>`_ repository.

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

Usage
-----
Expand Down
10 changes: 6 additions & 4 deletions components/browser_kit.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,13 @@ The BrowserKit Component
Installation
------------

You can install the component in two different ways:
.. code-block:: terminal

* :doc:`Install it via Composer </components/using_components>`
(``symfony/browser-kit`` on `Packagist`_);
* Use the official Git repository (https://github.com/symfony/browser-kit).
$ composer require symfony/browser-kit

Alternatively, you can clone the `<https://github.com/symfony/browser-kit>`_ repository.

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

Basic Usage
-----------
Expand Down
8 changes: 4 additions & 4 deletions components/class_loader.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ not be found by a class loader.
Installation
------------

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

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

Expand Down
8 changes: 4 additions & 4 deletions components/config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ The Config Component
Installation
------------

You can install the component in 2 different ways:
.. code-block:: terminal

* :doc:`Install it via Composer </components/using_components>` (``symfony/config``
on `Packagist`_);
* Use the official Git repository (https://github.com/symfony/config).
$ composer require symfony/config

Alternatively, you can clone the `<https://github.com/symfony/config>`_ repository.

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

Expand Down
7 changes: 4 additions & 3 deletions components/console.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@ other batch jobs.
Installation
------------

You can install the component in 2 different ways:
.. code-block:: terminal

* :doc:`Install it via Composer </components/using_components>` (``symfony/console`` on `Packagist`_);
* Use the official Git repository (https://github.com/symfony/console).
$ composer require symfony/console

Alternatively, you can clone the `<https://github.com/symfony/console>`_ repository.

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

Expand Down
7 changes: 4 additions & 3 deletions components/css_selector.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ The CssSelector Component
Installation
------------

You can install the component in 2 different ways:
.. code-block:: terminal

* :doc:`Install it via Composer </components/using_components>` (``symfony/css-selector`` on `Packagist`_);
* Use the official Git repository (https://github.com/symfony/css-selector).
$ composer require symfony/css-selector

Alternatively, you can clone the `<https://github.com/symfony/css-selector>`_ repository.

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

Expand Down
7 changes: 4 additions & 3 deletions components/debug.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ The Debug Component
Installation
------------

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

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

Expand Down
8 changes: 4 additions & 4 deletions components/dependency_injection.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ For an introduction to Dependency Injection and service containers see
Installation
------------

You can install the component in 2 different ways:
.. code-block:: terminal

* :doc:`Install it via Composer </components/using_components>` (``symfony/dependency-injection``
on `Packagist`_);
* Use the official Git repository (https://github.com/symfony/dependency-injection).
$ composer require symfony/dependency-injection

Alternatively, you can clone the `<https://github.com/symfony/dependency-injection>`_ repository.

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

Expand Down
7 changes: 4 additions & 3 deletions components/dom_crawler.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@ The DomCrawler Component
Installation
------------

You can install the component in 2 different ways:
.. code-block:: terminal

* :doc:`Install it via Composer </components/using_components>` (``symfony/dom-crawler`` on `Packagist`_);
* Use the official Git repository (https://github.com/symfony/dom-crawler).
$ composer require symfony/dom-crawler

Alternatively, you can clone the `<https://github.com/symfony/dom-crawler>`_ repository.

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

Expand Down
8 changes: 4 additions & 4 deletions components/event_dispatcher.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@ event - ``kernel.response``. Here's how it works:
Installation
------------

You can install the component in 2 different ways:
.. code-block:: terminal

* :doc:`Install it via Composer </components/using_components>`
(``symfony/event-dispatcher`` on `Packagist`_);
* Use the official Git repository (https://github.com/symfony/event-dispatcher).
$ composer require symfony/event-dispatcher

Alternatively, you can clone the `<https://github.com/symfony/event-dispatcher>`_ repository.

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

Expand Down
9 changes: 6 additions & 3 deletions components/expression_language.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,13 @@ The ExpressionLanguage Component
Installation
------------

You can install the component in 2 different ways:
.. code-block:: terminal

* :doc:`Install it via Composer </components/using_components>` (``symfony/expression-language`` on `Packagist`_);
* Use the official Git repository (https://github.com/symfony/expression-language).
$ composer require symfony/expression-language

Alternatively, you can clone the `<https://github.com/symfony/expression-language>`_ repository.

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

How can the Expression Engine Help Me?
--------------------------------------
Expand Down
7 changes: 4 additions & 3 deletions components/filesystem.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ The Filesystem Component
Installation
------------

You can install the component in 2 different ways:
.. code-block:: terminal

* :doc:`Install it via Composer </components/using_components>` (``symfony/filesystem`` on `Packagist`_);
* Use the official Git repository (https://github.com/symfony/filesystem).
$ composer require symfony/filesystem

Alternatively, you can clone the `<https://github.com/symfony/filesystem>`_ repository.

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

Expand Down
7 changes: 4 additions & 3 deletions components/finder.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@ The Finder Component
Installation
------------

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

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

Expand Down
7 changes: 4 additions & 3 deletions components/form.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@ be from a normal form post or from an API.
Installation
------------

You can install the component in 2 different ways:
.. code-block:: terminal

$ composer require symfony/form

* :doc:`Install it via Composer </components/using_components>` (``symfony/form`` on `Packagist`_);
* Use the official Git repository (https://github.com/symfony/form).
Alternatively, you can clone the `<https://github.com/symfony/form>`_ repository.

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

Expand Down
7 changes: 4 additions & 3 deletions components/http_foundation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,11 @@ variables and functions by an object-oriented layer.
Installation
------------

You can install the component in 2 different ways:
.. code-block:: terminal

* :doc:`Install it via Composer </components/using_components>` (``symfony/http-foundation`` on `Packagist`_);
* Use the official Git repository (https://github.com/symfony/http-foundation).
$ composer require symfony/http-foundation

Alternatively, you can clone the `<https://github.com/symfony/http-foundation>`_ repository.

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

Expand Down
7 changes: 4 additions & 3 deletions components/http_kernel.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ The HttpKernel Component
Installation
------------

You can install the component in 2 different ways:
.. code-block:: terminal

* :doc:`Install it via Composer </components/using_components>` (``symfony/http-kernel`` on Packagist_);
* Use the official Git repository (https://github.com/symfony/http-kernel).
$ composer require symfony/http-kernel

Alternatively, you can clone the `<https://github.com/symfony/http-kernel>`_ repository.

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

Expand Down
9 changes: 6 additions & 3 deletions components/intl.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,13 @@ The Intl Component
Installation
------------

You can install the component in two different ways:
.. code-block:: terminal

* :doc:`Install it via Composer</components/using_components>` (``symfony/intl`` on `Packagist`_);
* Using the official Git repository (https://github.com/symfony/intl).
$ composer require symfony/intl

Alternatively, you can clone the `<https://github.com/symfony/intl>`_ repository.

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

If you install the component via Composer, the following classes and functions
of the intl extension will be automatically provided if the intl extension is
Expand Down
7 changes: 4 additions & 3 deletions components/options_resolver.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ The OptionsResolver Component
Installation
------------

You can install the component in 2 different ways:
.. code-block:: terminal

* :doc:`Install it via Composer </components/using_components>` (``symfony/options-resolver`` on `Packagist`_);
* Use the official Git repository (https://github.com/symfony/options-resolver).
$ composer require symfony/options-resolver

Alternatively, you can clone the `<https://github.com/symfony/options-resolver>`_ repository.

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

Expand Down
7 changes: 3 additions & 4 deletions components/phpunit_bridge.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,11 @@ It comes with the following features:
Installation
------------

You can install the component in 2 different ways:
.. code-block:: terminal

* :doc:`Install it via Composer </components/using_components>`
(``symfony/phpunit-bridge`` on `Packagist`_); as a dev dependency;
$ composer require symfony/phpunit-bridge

* Use the official Git repository (https://github.com/symfony/phpunit-bridge).
Alternatively, you can clone the `<https://github.com/symfony/phpunit-bridge>`_ repository.

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

Expand Down
7 changes: 4 additions & 3 deletions components/process.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ The Process Component
Installation
------------

You can install the component in 2 different ways:
.. code-block:: terminal

* :doc:`Install it via Composer </components/using_components>` (``symfony/process`` on `Packagist`_);
* Use the official Git repository (https://github.com/symfony/process).
$ composer require symfony/process

Alternatively, you can clone the `<https://github.com/symfony/process>`_ repository.

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

Expand Down
7 changes: 4 additions & 3 deletions components/property_access.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@ The PropertyAccess Component
Installation
------------

You can install the component in two different ways:
.. code-block:: terminal

* :doc:`Install it via Composer</components/using_components>` (``symfony/property-access`` on `Packagist`_);
* Use the official Git repository (https://github.com/symfony/property-access).
$ composer require symfony/property-access

Alternatively, you can clone the `<https://github.com/symfony/property-access>`_ repository.

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

Expand Down
9 changes: 6 additions & 3 deletions components/psr7.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,13 @@ The PSR-7 Bridge
Installation
------------

You can install the component in 2 different ways:
.. code-block:: terminal

* :doc:`Install it via Composer </components/using_components>` (`symfony/psr-http-message-bridge on Packagist`_);
* Use the official Git repository (https://github.com/symfony/psr-http-message-bridge).
$ composer require symfony/psr-http-message-bridge

Alternatively, you can clone the `<https://github.com/symfony/psr-http-message-bridge>`_ repository.

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

The bridge also needs a PSR-7 implementation to allow converting HttpFoundation
objects to PSR-7 objects. It provides native support for `Zend Diactoros`_.
Expand Down
9 changes: 6 additions & 3 deletions components/require_autoload.rst.inc
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
Then, require the ``vendor/autoload.php`` file to enable the autoloading mechanism
provided by Composer. Otherwise, your application won't be able to find the classes
of this Symfony component.
.. note::

If you install this component outside of a Symfony application, you must
require the ``vendor/autoload.php`` file in your code to enable the class
autoloading mechanism provided by Composer. Read
:doc:`this article </components/using_components>` for more details.
7 changes: 4 additions & 3 deletions components/routing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@ The Routing Component
Installation
------------

You can install the component in 2 different ways:
.. code-block:: terminal

* :doc:`Install it via Composer </components/using_components>` (``symfony/routing`` on `Packagist`_);
* Use the official Git repository (https://github.com/symfony/routing).
$ composer require symfony/routing

Alternatively, you can clone the `<https://github.com/symfony/routing>`_ repository.

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

Expand Down
7 changes: 4 additions & 3 deletions components/security.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ The Security Component
Installation
------------

You can install the component in 2 different ways:
.. code-block:: terminal

* :doc:`Install it via Composer </components/using_components>` (``symfony/security`` on Packagist_);
* Use the official Git repository (https://github.com/symfony/security).
$ composer require symfony/security

Alternatively, you can clone the `<https://github.com/symfony/security>`_ repository.

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

Expand Down
Loading