@@ -85,39 +85,69 @@ The following packages are suggested:
85
85
86
86
## Usage
87
87
88
- This is a simple metapackage, but still can be used in different ways.
88
+ This is a simple metapackage which can be used in two different ways; globally installed or on a per project basis .
89
89
90
- #### Global install
90
+ Both methods have their pros (+) and cons (-).
91
91
92
- This is by far the easiest and most convenient method. Simply having all the tools available system wide.
92
+ ** Global installation** :
93
+ * \+ All tools are present anywhere on your system
94
+ * \+ Can be used on any codebase, even the ones that don't use Composer.
95
+ * \- You'll have to update manually, since it's not a project, versioning is not managed.
96
+
97
+ * Per project installation* :
98
+ * \+ Versioning (update/installation) is provided in the project
99
+ * \- Tools not available system wide. You'll need to execute them from a specific path.
100
+
101
+ These methods are not mutual exclusive. You can have your global installed version, which can be used anywhere, but
102
+ still use the one provided in a project.
103
+
104
+ ## Installation
105
+
106
+ ### Global installation
93
107
94
108
The following script will install a system wide Composer for you, including the QA tools.
95
109
96
110
``` bash
97
111
bash <( curl -S https://raw.github.com/DealerDirect/php-qa-tools/master/bin/install.sh)
98
112
```
99
113
100
- If you already have a global Composer setup, you can execute this to include the tools.
114
+ That's it. This can be put in any instructions, such as a README or someone's blog, since the logic is in the shell
115
+ script. Provided you download the script using https, the file has standard levels of authentication and encryption
116
+ protecting it from manipulation.
117
+
118
+ This is obviously a shell script, if you're really concerned about the argument that it may contain nefarious
119
+ activities within, you can easily review it before you run it.
120
+
121
+ ``` bash
122
+ curl -o https://raw.github.com/DealerDirect/php-qa-tools/master/bin/install.sh
123
+ less install.sh
124
+ bash instal.sh
125
+ ```
126
+
127
+ If you already have a global Composer setup, you could include the tools manually, without the need for running
128
+ the shell script above.
101
129
102
130
``` bash
103
- composer global require " dealerdirect/qa-tools"
131
+ composer global require " dealerdirect/qa-tools:* "
104
132
```
105
133
106
- #### Project install
134
+ #### Per project installation
107
135
108
136
The other option is to install this on a per project basis.
109
137
138
+ Using Composer (preferred method):
139
+
110
140
``` bash
111
- composer require --dev " dealerdirect/qa-tools"
141
+ composer require --dev " dealerdirect/qa-tools:* "
112
142
```
113
143
114
- Or modify your ` composer.json ` to include ` dealerdirect/qa-tools ` in the ` require-dev ` sections.
144
+ Or modify your ` composer.json ` to include ` dealerdirect/qa-tools ` in the ` require-dev ` sections:
115
145
116
146
``` json
117
147
{
118
148
"name" : " acme/my-project" ,
119
149
"require" : {
120
- "** your requirements ** " : " *"
150
+ "… " : " *"
121
151
},
122
152
"require-dev" : {
123
153
"dealerdirect/qa-tools" : " *"
0 commit comments