diff --git a/components/asset.rst b/components/asset.rst index b3beb8306e2..fb0dfd30565 100644 --- a/components/asset.rst +++ b/components/asset.rst @@ -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 ` (``symfony/asset`` on `Packagist`_); -* Use the official Git repository (https://github.com/symfony/asset). + $ composer require symfony/asset + +Alternatively, you can clone the ``_ repository. + +.. include:: /components/require_autoload.rst.inc Usage ----- diff --git a/components/browser_kit.rst b/components/browser_kit.rst index 55e0525e1bd..e6e469196ce 100644 --- a/components/browser_kit.rst +++ b/components/browser_kit.rst @@ -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 ` - (``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 ``_ repository. + +.. include:: /components/require_autoload.rst.inc Basic Usage ----------- diff --git a/components/class_loader.rst b/components/class_loader.rst index 3dafacb7736..3a7021e8738 100644 --- a/components/class_loader.rst +++ b/components/class_loader.rst @@ -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 ` (``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 ``_ repository. .. include:: /components/require_autoload.rst.inc diff --git a/components/config.rst b/components/config.rst index 8154af898a5..8134007103d 100644 --- a/components/config.rst +++ b/components/config.rst @@ -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 ` (``symfony/config`` - on `Packagist`_); -* Use the official Git repository (https://github.com/symfony/config). + $ composer require symfony/config + +Alternatively, you can clone the ``_ repository. .. include:: /components/require_autoload.rst.inc diff --git a/components/console.rst b/components/console.rst index 41de045af25..27f670055f6 100644 --- a/components/console.rst +++ b/components/console.rst @@ -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 ` (``symfony/console`` on `Packagist`_); -* Use the official Git repository (https://github.com/symfony/console). + $ composer require symfony/console + +Alternatively, you can clone the ``_ repository. .. include:: /components/require_autoload.rst.inc diff --git a/components/css_selector.rst b/components/css_selector.rst index 6805c740bbc..579ff693c96 100644 --- a/components/css_selector.rst +++ b/components/css_selector.rst @@ -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 ` (``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 ``_ repository. .. include:: /components/require_autoload.rst.inc diff --git a/components/debug.rst b/components/debug.rst index 21671975416..e42e3d3423a 100644 --- a/components/debug.rst +++ b/components/debug.rst @@ -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 ` (``symfony/debug`` on `Packagist`_); -* Use the official Git repository (https://github.com/symfony/debug). + $ composer require symfony/debug + +Alternatively, you can clone the ``_ repository. .. include:: /components/require_autoload.rst.inc diff --git a/components/dependency_injection.rst b/components/dependency_injection.rst index 07de6cd8048..a0e712dac83 100644 --- a/components/dependency_injection.rst +++ b/components/dependency_injection.rst @@ -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 ` (``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 ``_ repository. .. include:: /components/require_autoload.rst.inc diff --git a/components/dom_crawler.rst b/components/dom_crawler.rst index ee27474c469..cdf8d02643d 100644 --- a/components/dom_crawler.rst +++ b/components/dom_crawler.rst @@ -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 ` (``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 ``_ repository. .. include:: /components/require_autoload.rst.inc diff --git a/components/event_dispatcher.rst b/components/event_dispatcher.rst index 345bcb7a41d..8f97727f737 100644 --- a/components/event_dispatcher.rst +++ b/components/event_dispatcher.rst @@ -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 ` - (``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 ``_ repository. .. include:: /components/require_autoload.rst.inc diff --git a/components/expression_language.rst b/components/expression_language.rst index 09865f6e5da..9a55f3ed066 100644 --- a/components/expression_language.rst +++ b/components/expression_language.rst @@ -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 ` (``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 ``_ repository. + +.. include:: /components/require_autoload.rst.inc How can the Expression Engine Help Me? -------------------------------------- diff --git a/components/filesystem.rst b/components/filesystem.rst index 8a44b211a15..d49f9497b4a 100644 --- a/components/filesystem.rst +++ b/components/filesystem.rst @@ -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 ` (``symfony/filesystem`` on `Packagist`_); -* Use the official Git repository (https://github.com/symfony/filesystem). + $ composer require symfony/filesystem + +Alternatively, you can clone the ``_ repository. .. include:: /components/require_autoload.rst.inc diff --git a/components/finder.rst b/components/finder.rst index e87b40b242d..ed6fbf507b6 100644 --- a/components/finder.rst +++ b/components/finder.rst @@ -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 ` (``symfony/finder`` on `Packagist`_); -* Use the official Git repository (https://github.com/symfony/finder). + $ composer require symfony/finder + +Alternatively, you can clone the ``_ repository. .. include:: /components/require_autoload.rst.inc diff --git a/components/form.rst b/components/form.rst index ee71d435d9a..6a7e81956f8 100644 --- a/components/form.rst +++ b/components/form.rst @@ -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 ` (``symfony/form`` on `Packagist`_); -* Use the official Git repository (https://github.com/symfony/form). +Alternatively, you can clone the ``_ repository. .. include:: /components/require_autoload.rst.inc diff --git a/components/http_foundation.rst b/components/http_foundation.rst index 013ad0385d1..8d2603dc36e 100644 --- a/components/http_foundation.rst +++ b/components/http_foundation.rst @@ -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 ` (``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 ``_ repository. .. include:: /components/require_autoload.rst.inc diff --git a/components/http_kernel.rst b/components/http_kernel.rst index d7f80fb05eb..2b24d38c5c0 100644 --- a/components/http_kernel.rst +++ b/components/http_kernel.rst @@ -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 ` (``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 ``_ repository. .. include:: /components/require_autoload.rst.inc diff --git a/components/intl.rst b/components/intl.rst index 55dc9a62331..1322ff49302 100644 --- a/components/intl.rst +++ b/components/intl.rst @@ -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` (``symfony/intl`` on `Packagist`_); -* Using the official Git repository (https://github.com/symfony/intl). + $ composer require symfony/intl + +Alternatively, you can clone the ``_ 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 diff --git a/components/options_resolver.rst b/components/options_resolver.rst index dd998b6c07b..5ea4d617a29 100644 --- a/components/options_resolver.rst +++ b/components/options_resolver.rst @@ -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 ` (``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 ``_ repository. .. include:: /components/require_autoload.rst.inc diff --git a/components/phpunit_bridge.rst b/components/phpunit_bridge.rst index 69c35a7d3a0..4a9b16a9491 100644 --- a/components/phpunit_bridge.rst +++ b/components/phpunit_bridge.rst @@ -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 ` - (``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 ``_ repository. .. include:: /components/require_autoload.rst.inc diff --git a/components/process.rst b/components/process.rst index 6b0e8b7f316..939548f789e 100644 --- a/components/process.rst +++ b/components/process.rst @@ -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 ` (``symfony/process`` on `Packagist`_); -* Use the official Git repository (https://github.com/symfony/process). + $ composer require symfony/process + +Alternatively, you can clone the ``_ repository. .. include:: /components/require_autoload.rst.inc diff --git a/components/property_access.rst b/components/property_access.rst index 6167c842b48..f229d52d4a2 100644 --- a/components/property_access.rst +++ b/components/property_access.rst @@ -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` (``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 ``_ repository. .. include:: /components/require_autoload.rst.inc diff --git a/components/psr7.rst b/components/psr7.rst index 11b14caa072..dce04131a2d 100644 --- a/components/psr7.rst +++ b/components/psr7.rst @@ -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 ` (`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 ``_ 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`_. diff --git a/components/require_autoload.rst.inc b/components/require_autoload.rst.inc index 568562507c1..9d47bd7ffca 100644 --- a/components/require_autoload.rst.inc +++ b/components/require_autoload.rst.inc @@ -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 ` for more details. diff --git a/components/routing.rst b/components/routing.rst index 25a8aa79294..b1690cce6bf 100644 --- a/components/routing.rst +++ b/components/routing.rst @@ -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 ` (``symfony/routing`` on `Packagist`_); -* Use the official Git repository (https://github.com/symfony/routing). + $ composer require symfony/routing + +Alternatively, you can clone the ``_ repository. .. include:: /components/require_autoload.rst.inc diff --git a/components/security.rst b/components/security.rst index 1e59980cac3..2d20b6408df 100644 --- a/components/security.rst +++ b/components/security.rst @@ -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 ` (``symfony/security`` on Packagist_); -* Use the official Git repository (https://github.com/symfony/security). + $ composer require symfony/security + +Alternatively, you can clone the ``_ repository. .. include:: /components/require_autoload.rst.inc diff --git a/components/serializer.rst b/components/serializer.rst index c2669f05752..fa76ee66325 100644 --- a/components/serializer.rst +++ b/components/serializer.rst @@ -27,10 +27,11 @@ but it can be useful for developing tools to serialize and deserialize your obje Installation ------------ -You can install the component in 2 different ways: +.. code-block:: terminal -* :doc:`Install it via Composer ` (``symfony/serializer`` on `Packagist`_); -* Use the official Git repository (https://github.com/symfony/serializer). + $ composer require symfony/serializer + +Alternatively, you can clone the ``_ repository. .. include:: /components/require_autoload.rst.inc diff --git a/components/stopwatch.rst b/components/stopwatch.rst index c3ebd41031d..878a1275a1f 100644 --- a/components/stopwatch.rst +++ b/components/stopwatch.rst @@ -10,10 +10,11 @@ The Stopwatch Component Installation ------------ -You can install the component in two different ways: +.. code-block:: terminal -* :doc:`Install it via Composer` (``symfony/stopwatch`` on `Packagist`_); -* Use the official Git repository (https://github.com/symfony/stopwatch). + $ composer require symfony/stopwatch + +Alternatively, you can clone the ``_ repository. .. include:: /components/require_autoload.rst.inc diff --git a/components/templating.rst b/components/templating.rst index 8e42fdad6d1..3549fc50020 100644 --- a/components/templating.rst +++ b/components/templating.rst @@ -16,10 +16,11 @@ The Templating Component Installation ------------ -You can install the component in 2 different ways: +.. code-block:: terminal -* :doc:`Install it via Composer ` (``symfony/templating`` on `Packagist`_); -* Use the official Git repository (https://github.com/symfony/templating). + $ composer require symfony/templating + +Alternatively, you can clone the ``_ repository. .. include:: /components/require_autoload.rst.inc diff --git a/components/translation.rst b/components/translation.rst index 91a64c68227..c90e668551a 100644 --- a/components/translation.rst +++ b/components/translation.rst @@ -11,10 +11,11 @@ The Translation Component Installation ------------ -You can install the component in 2 different ways: +.. code-block:: terminal -* :doc:`Install it via Composer ` (``symfony/translation`` on `Packagist`_); -* Use the official Git repository (https://github.com/symfony/translation). + $ composer require symfony/translation + +Alternatively, you can clone the ``_ repository. .. include:: /components/require_autoload.rst.inc diff --git a/components/validator.rst b/components/validator.rst index 2ff7e75503c..fbb951479ba 100644 --- a/components/validator.rst +++ b/components/validator.rst @@ -11,10 +11,11 @@ The Validator Component Installation ------------ -You can install the component in two different ways: +.. code-block:: terminal -* :doc:`Install it via Composer ` (``symfony/validator`` on `Packagist`_); -* Use the official Git repository (https://github.com/symfony/Validator). + $ composer require symfony/validator + +Alternatively, you can clone the ``_ repository. .. include:: /components/require_autoload.rst.inc diff --git a/components/var_dumper.rst b/components/var_dumper.rst index 88dc23d068f..5071fa6828e 100644 --- a/components/var_dumper.rst +++ b/components/var_dumper.rst @@ -15,10 +15,13 @@ The VarDumper Component Installation ------------ -You can install the component in 2 different ways: +.. code-block:: terminal -* :doc:`Install it via Composer ` (``symfony/var-dumper`` on `Packagist`_); -* Use the official Git repository (https://github.com/symfony/var-dumper). + $ composer require symfony/var-dumper + +Alternatively, you can clone the ``_ repository. + +.. include:: /components/require_autoload.rst.inc .. note:: diff --git a/components/yaml.rst b/components/yaml.rst index b48cfb46ab1..774675f7559 100644 --- a/components/yaml.rst +++ b/components/yaml.rst @@ -29,10 +29,11 @@ the `YAML 1.2 version specification`_. Installation ------------ -You can install the component in 2 different ways: +.. code-block:: terminal -* :doc:`Install it via Composer ` (``symfony/yaml`` on `Packagist`_); -* Use the official Git repository (https://github.com/symfony/yaml). + $ composer require symfony/yaml + +Alternatively, you can clone the ``_ repository. .. include:: /components/require_autoload.rst.inc