Skip to content

Commit 51ceb15

Browse files
author
David Fuhr
committed
[~TASK] Moved doc to README
1 parent e594aba commit 51ceb15

File tree

3 files changed

+42
-40
lines changed

3 files changed

+42
-40
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
/.idea
2+
/composer.phar
3+
/doc
24
/vendor

README.md

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ How to set up your ```composer.json``` in your project:
8080
}
8181
```
8282

83-
## Testing ##
83+
## Testing
8484

8585
First install dev-stuff:
8686

@@ -89,3 +89,42 @@ First install dev-stuff:
8989
```
9090

9191
then run ```phpunit``` in projekt-root directory
92+
93+
## How to Overwrite Dependencies
94+
95+
We don't want to use always the official repositories for specific dependencies.
96+
For example for development purpose or use versions with custom patches.
97+
98+
For this case you have the _repositories_ section inside your project composer.json
99+
Here you can define own package composer.json for specific dependencies by the package name.
100+
101+
This example shows how to use a local git projects local-master branch which even works without a composer.json inside
102+
and a project in VCS with existing composer.json, which is not yet on packagist.
103+
104+
```json
105+
"repositories": [
106+
{
107+
"type": "package",
108+
"package": {
109+
"name": "magento-hackathon/magento-composer-installer",
110+
"version": "dev-master",
111+
"type": "composer-installer",
112+
"source": {
113+
"type": "git",
114+
"url": "/public_projects/magento/magento-composer-installer/",
115+
"reference": "local-master"
116+
},
117+
"autoload": {
118+
"psr-0": {"MagentoHackathon\\Composer\\Magento": "src/"}
119+
},
120+
"extra": {
121+
"class": "\\MagentoHackathon\\Composer\\Magento\\Installer"
122+
}
123+
}
124+
},
125+
{
126+
"type": "vcs",
127+
"url": "git://github.com/firegento/firegento-germansetup.git"
128+
}
129+
]
130+
```

doc/HowToOverwriteDependencies.md

Lines changed: 0 additions & 39 deletions
This file was deleted.

0 commit comments

Comments
 (0)