Skip to content

Commit c2494a5

Browse files
committed
Added to instructions for working with other packages from git clones.
1 parent 7f51301 commit c2494a5

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

README.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,24 @@ that Drupal core does!). This can be useful to develop packages and modules in
9898
tandem with core.
9999

100100
1. Create a git clone of the module or package. The `repos/` folder can be used
101-
for this.
101+
for this. It's simplest to start off from a main branch so that Composer sees
102+
this as the installed version, and dependencies work properly.
102103
2. Define a path respository for the package. See
103104
https://getcomposer.org/doc/05-repositories.md#path for details.
104105
3. Do `composer require` for the package.
105106

107+
You can now switch the package to a feature branch, such as one from a merge
108+
request, in order to work on a feature or bug.
109+
110+
If you need to perform Composer operations, Composer may complain that the
111+
feature branch does not satisfy requirements. You can do one of:
112+
113+
* Check out the main branch with git, perform the Composer operations, then
114+
return to the feature branch.
115+
* Define the version that Composer sees for this package by specifying the
116+
"versions" option in the declaration of the path repository in
117+
`composer.json`.
118+
106119
## Limitations
107120

108121
### Contrib and custom tests

0 commit comments

Comments
 (0)