You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: cookbook/workflow/_vendor_deps.rst.inc
+14-12Lines changed: 14 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,6 @@ Managing Vendor Libraries with bin/vendors and deps
3
3
4
4
### How does it work ?
5
5
6
-
7
6
Every Symfony project uses a group of third-party "vendor" libraries. One
8
7
way or another the goal is to download these files into your ``vendor/``
9
8
directory and, ideally, to give you some sane way to manage the exact version
@@ -51,10 +50,8 @@ script to ensure that all of the needed vendor libraries are downloaded.
51
50
by updating them to the version specified in ``deps`` and recording it
52
51
into the ``deps.lock`` file.
53
52
54
-
55
53
### Hacking vendor libraries
56
54
57
-
58
55
Sometimes, you want a specific branch, tag, or commit of a library to be downloaded
59
56
or upgraded. You can set that directly to the ``deps`` file :
60
57
@@ -65,21 +62,26 @@ or upgraded. You can set that directly to the ``deps`` file :
65
62
target=/bundles/Acme/AwesomeBundle
66
63
version=the-awesome-version
67
64
65
+
* The ``git`` option sets the URL of the library. It can use various protocols,
66
+
like ``http://`` as well as ``git://``.
68
67
69
-
* The ``git`` option sets the URL of the library. It can use various protocols, like ``http://`` as well as ``git://``.
68
+
* The ``target`` option specifies where the repository will live : plain Symfony
69
+
bundles should go under the ``vendor/bundles/Acme`` directory, other third-party
70
+
libraries usually go to ``vendor/my-awesome-library-name``. The target directory
71
+
defaults to this last option when not specified.
70
72
71
-
* The ``target`` option specifies where the repository will live : plain Symfony bundles should go under the ``vendor/bundles/Acme`` directory, other third-party libraries usually go to ``vendor/my-awesome-library-name``. The target directory defaults to this last option when not specified.
73
+
* The ``version`` option allows you to set a specific revision. You can use a tag
74
+
(``version=origin/0.42``) or a branch name (``refs/remotes/origin/awesome-branch``).
75
+
It defaults to ``origin/HEAD``.
72
76
73
-
* The ``version`` option allows you to set a specific revision. You can use a tag (``version=origin/0.42``) or a branch name (``refs/remotes/origin/awesome-branch``). It defaults to ``origin/HEAD``.
74
-
75
-
76
77
### Updating workflow
77
78
79
+
When you execute the ``php bin/vendors install``, for every library, the script first
80
+
checks if the install directory exists.
78
81
79
-
When you execute the ``php bin/vendors install``, for every library, the script first checks if the install directory exists.
80
-
81
-
If it does not (and ONLY if it does not, it runs a ``git clone``.
82
+
If it does not (and ONLY if it does not), it runs a ``git clone``.
82
83
83
84
Then, it does a ``git fetch origin`` and a ``git reset --hard the-awesome-version``.
84
85
85
-
This means that the repository will only be cloned once. If you want to perform any change of the git remote, you MUST delete the entire target directory, not only its content.
86
+
This means that the repository will only be cloned once. If you want to perform any
87
+
change of the git remote, you MUST delete the entire target directory, not only its content.
0 commit comments