Skip to content

Commit 3e5f44d

Browse files
committed
minor #14121 Update using_components.rst (noniagriconomie)
This PR was submitted for the 3.4 branch but it was squashed and merged into the 4.4 branch instead. Discussion ---------- Update using_components.rst Small improvement on this doc entry point Commits ------- fca061e Update using_components.rst
2 parents 715ff86 + fca061e commit 3e5f44d

File tree

1 file changed

+16
-6
lines changed

1 file changed

+16
-6
lines changed

components/using_components.rst

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Using the Finder Component
2020

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

23-
**2.** Open a terminal and use Composer to grab the library.
23+
**2.** Open a terminal, step into this directory and use Composer to grab the library.
2424

2525
.. code-block:: terminal
2626
@@ -43,26 +43,36 @@ the ``vendor/autoload.php`` file that was generated by Composer. This file
4343
takes care of autoloading all of the libraries so that you can use them
4444
immediately::
4545

46-
// File example: src/script.php
47-
48-
// update this to the path to the "vendor/"
49-
// directory, relative to this file
46+
// Project structure example:
47+
// my_project/
48+
// data/
49+
// ... # Some project data
50+
// src/
51+
// my_script.php # Main entry point
52+
// vendor/
53+
// autoload.php # Autoloader generated by Composer
54+
// ... # Packages downloaded by Composer
55+
56+
// File example: src/my_script.php
57+
// Autoloader relative path to this PHP file
5058
require_once __DIR__.'/../vendor/autoload.php';
5159

5260
use Symfony\Component\Finder\Finder;
5361

5462
$finder = new Finder();
5563
$finder->in('../data/');
5664

57-
// ...
65+
// rest of your PHP code...
5866

5967
Now what?
6068
---------
6169

6270
Now, the component is installed and autoloaded. Read the specific component's
6371
documentation to find out more about how to use it.
72+
All `Symfony Components`_ are documented here as standalone libraries.
6473

6574
And have fun!
6675

6776
.. _Composer: https://getcomposer.org
6877
.. _Install Composer: https://getcomposer.org/download/
78+
.. _Symfony Components: https://symfony.com/components

0 commit comments

Comments
 (0)