Skip to content

Commit ebe4a57

Browse files
author
Slavey Karadzhov
committed
Split the documentation [ci skip].
1 parent ecdab08 commit ebe4a57

File tree

3 files changed

+124
-78
lines changed

3 files changed

+124
-78
lines changed

CONTRIBUTING.md

+100
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
# CONTRIBUTING
2+
3+
## RESOURCES
4+
5+
If you wish to contribute to ZendServerSDK, please be sure to read the following
6+
resources:
7+
8+
- [Coding Standards](https://github.com/zendframework/zf2/wiki/Coding-Standards)
9+
We use the same coding standards as Zend Framework 2.
10+
- [Git Pre-commit Hook](https://github.com/zendframework/zf2/blob/master/README-GIT.md#pre-commit-hook-optional)
11+
This hook will make sure that the code that you have changed is meeting the coding standards.
12+
13+
14+
If you are working on new features, or refactoring an existing
15+
component, please [create a proposal](https://github.com/zend-patterns/ZendServerSDK/issues/new).
16+
17+
## REPORTING ISSUES
18+
19+
To report an issue, please, use our [issue tracker on github](https://github.com/zend-patterns/ZendServerSDK/issues).
20+
21+
If you have found a potential security issue, please **DO NOT** report it on the public
22+
issue tracker: send it to us at [[email protected]](mailto:[email protected]) instead.
23+
We will work with you to verify the vulnerability and patch it as soon as possible.
24+
25+
When reporting issues, please provide the following information:
26+
27+
- Component(s) affected
28+
- A description indicating how to reproduce the issue
29+
- (Relevant to security issues) A summary of the security vulnerability and impact
30+
31+
## DEVELOPMENT CODE
32+
33+
Clone the latest source code
34+
```sh
35+
git clone https://github.com/zend-patterns/ZendServerSDK.git
36+
```
37+
38+
Then change the directory to the newly created one
39+
```sh
40+
cd ZendServerSDK
41+
```
42+
43+
Install composer
44+
```sh
45+
wget http://getcomposer.org/composer.phar
46+
```
47+
48+
Get all dependant packages.
49+
```sh
50+
php composer.phar install --no-dev
51+
```
52+
53+
Run the following, from the directory where this file is located, to see all commands:
54+
55+
```
56+
php bin/zs-client.php --help
57+
```
58+
59+
If you want to see information about certain command only, then run:
60+
61+
```
62+
php bin/zs-client.php <commandName> --help
63+
```
64+
65+
Run Tests
66+
=========
67+
68+
To run tests:
69+
70+
- Get the latest source code as shown above.
71+
- Instruct composer to install the ```dev``` requirements.
72+
```
73+
php composer.phar install --dev --prefer-source
74+
```
75+
- Run the tests via `phpunit` and the provided PHPUnit config, like in this example:
76+
77+
```sh
78+
vendor/bin/phpunit -c module/Client/tests/phpunit.xml
79+
```
80+
81+
Compile
82+
============
83+
You can pack the source code into one stand-alone file that php can read.
84+
Run the following command to produce the zs-client.phar file.
85+
86+
```sh
87+
php bin/create-phar.php
88+
```
89+
90+
The generated file should be saved under bin/zs-client.phar. You can copy it
91+
and use it without the need to have the other PHP files.
92+
93+
## CONTIBUTE NEW CODE
94+
If you want to contribute new changes to the code the fastest way will be to [fork](https://github.com/zend-patterns/ZendServerSDK/#fork-destination-box) our
95+
repository then make the changes in the fork and create a [pull request](https://help.github.com/articles/using-pull-requests/).
96+
97+
Make sure that you have PHPUnit tests that cover the changed code.
98+
Pull requests with bad coding style and missing PHPUnit tests are more likely
99+
to be rejected.
100+

README.md

+23-77
Original file line numberDiff line numberDiff line change
@@ -11,83 +11,29 @@ PHP version >=5.3.3 with enabled phar module.
1111
Installation
1212
============
1313

14-
15-
Stable Version
16-
--------
17-
You can copy locally the latest stable in a stand-alone file from:
14+
You can copy locally the latest stable version as a stand-alone file from:
1815
https://github.com/zend-patterns/ZendServerSDK/raw/master/bin/zs-client.phar
1916

20-
On Linux you just need to execute the following command:
17+
On Linux you can execute the following command:
2118

22-
```
19+
```sh
2320
wget https://github.com/zend-patterns/ZendServerSDK/raw/master/bin/zs-client.phar
2421
```
2522

26-
Development Version
27-
-------------------
23+
Contributing
24+
===========
2825
[![Build Status](https://travis-ci.org/zend-patterns/ZendServerSDK.svg?branch=master)](https://travis-ci.org/zend-patterns/ZendServerSDK)
29-
30-
Clone the latest source code
31-
```
32-
git clone https://github.com/zend-patterns/ZendServerSDK.git
33-
```
34-
35-
Then change the directory to the newly created one
36-
```
37-
cd ZendServerSDK
38-
```
39-
40-
Install composer
41-
```
42-
wget http://getcomposer.org/composer.phar
43-
```
44-
45-
Get all dependant packages.
46-
```
47-
php composer.phar install --no-dev
48-
```
49-
26+
If you wish to contribute to the project, please read the
27+
[CONTRIBUTING.md](CONTRIBUTING.md) file.
5028

5129
Usage
5230
============
5331

54-
Stable Version
55-
---------
56-
5732
Run the phar file with --help to see the available commands:
58-
```
33+
```sh
5934
php zs-client.phar --help
6035
```
6136

62-
See below for more options.
63-
Notice: When using the stable version remember to use zs-client.phar instead of bin/zs-client.php.
64-
65-
Development Version
66-
---------
67-
Run the following, from the directory where this file is located, to see all commands:
68-
69-
```
70-
php bin/zs-client.php --help
71-
```
72-
73-
If you want to see information about certain command only, then run:
74-
75-
```
76-
php bin/zs-client.php <commandName> --help
77-
```
78-
79-
Compile
80-
============
81-
You can pack the source code into one stand-alone file that php can read.
82-
Run the following command to produce the zs-client.phar file.
83-
84-
```
85-
php bin/create-phar.php
86-
```
87-
88-
The generated file should be saved under bin/zs-client.phar. You can copy it
89-
and use it without the need to have the other PHP files.
90-
9137
Use Cases
9238
============
9339

@@ -100,7 +46,7 @@ can contain information about the version of Zend Server.
10046

10147
To add a target run the following command:
10248
```
103-
php bin/zs-client.php addTarget --target="<put-here-unique-name>" \
49+
php bin/zs-client.phar addTarget --target="<put-here-unique-name>" \
10450
--zskey="<put-here-the-webapi-key-name>" \
10551
--zssecret="<put-here-the-webapi-key-hash>" \
10652
--zsurl="<(optional)put-here-valid-url>" \
@@ -110,7 +56,7 @@ To update a target run the command with the same --target value and provide the
11056
new values.
11157

11258
zsurl: if not specified, the value `http://localhost:10081` is used.
113-
zsversion: if not specified, the value `6.1` is used.
59+
zsversion: if not specified, the latest Zend Server version will be used.
11460

11561
The information about the available targets is saved in the home directory of
11662
the current user in a file named .zsapi.ini.
@@ -121,7 +67,7 @@ Once a target has been defined, specify it in subsequent commands by adding
12167
its unique name to the argument list, as in this example:
12268

12369
```
124-
php bin/zs-client.php monitorGetIssuesListPredefinedFilter \
70+
php bin/zs-client.phar monitorGetIssuesListPredefinedFilter \
12571
--target="<unique-name-from-addTarget-command>" \
12672
--filterId="Resources Issues"
12773
```
@@ -136,7 +82,7 @@ Below are the steps that you need to take:
13682

13783
### Enable Deployment Support
13884
```
139-
php bin/zs-client.php initZpk --folder="<folder-where-the-PHP-code-is>"
85+
php bin/zs-client.phar initZpk --folder="<folder-where-the-PHP-code-is>"
14086
```
14187

14288
This will add two new files in the specified folder: deployment.xml and deployment.properties.
@@ -148,7 +94,7 @@ the XML data to match your application name, version, etc.
14894
### Create Package
14995
Run the following command.
15096
```
151-
php bin/zs-client.php packZpk --folder="<folder-where-the-PHP-code-is>" --destination="<folder-where-the-package-will-be-created>"
97+
php bin/zs-client.phar packZpk --folder="<folder-where-the-PHP-code-is>" --destination="<folder-where-the-package-will-be-created>"
15298
```
15399
It will output the name of the newly created package file. You have to use this name to install
154100
or update an existing application on Zend Server. If you want to use other name for
@@ -159,7 +105,7 @@ There is experimental integration with composer that allows you to download the
159105
download them and convert them to zpk files. The above command with composer integration will look like this
160106

161107
```
162-
php bin/zs-client.php packZpk --folder="<folder-where-the-PHP-code-is>" \
108+
php bin/zs-client.phar packZpk --folder="<folder-where-the-PHP-code-is>" \
163109
--destination="<folder-where-the-package-will-be-created>" \
164110
--composer
165111
```
@@ -180,7 +126,7 @@ Example:
180126
### Deploy Package
181127
Run the following command to install a package.
182128
```
183-
php bin/zs-client.php installApp --zpk="<location-of-the-zpk-file>" \
129+
php bin/zs-client.phar installApp --zpk="<location-of-the-zpk-file>" \
184130
--target="<the-name-of-the-target>" \
185131
--baseUri="<baseUri>"
186132
```
@@ -189,7 +135,7 @@ installation can be passed using --userParams="{provide-params-as-query-string}"
189135
For example if you want to pass parameter APPLICATION_ENV and DB_TYPE then you can
190136
use the following
191137
```
192-
php bin/zs-client.php installApp --zpk="<location-of-the-zpk-file>" \
138+
php bin/zs-client.phar installApp --zpk="<location-of-the-zpk-file>" \
193139
--target="<the-name-of-the-target>" \
194140
--baseUri="<baseUri>" \
195141
--userParams="APPLICATION_ENV=staging&DB_TYPE=mysql"
@@ -199,12 +145,12 @@ If you use the composer integration then packZpk can create multiple packages, i
199145
deploy these newly created packages in the correct order.
200146

201147
```
202-
ZPKS=`php bin/zs-client.php packZpk --folder="<folder-where-the-PHP-code-is>" \
148+
ZPKS=`php bin/zs-client.phar packZpk --folder="<folder-where-the-PHP-code-is>" \
203149
--destination="<folder-where-the-package-will-be-created>" \
204150
--composer`;
205151
206152
for i in $ZPKS; do
207-
php bin/zs-client.php installApp --zpk="$i" \
153+
php bin/zs-client.phar installApp --zpk="$i" \
208154
--target="<the-name-of-the-target>" \
209155
--baseUri="<baseUri>" \
210156
--userParams="APPLICATION_ENV=staging&DB_TYPE=mysql"
@@ -219,7 +165,7 @@ In some cases we may expect slower communication between the client and the serv
219165
In that case we can set explicitly the http timeout to a bigger value. The example below shows how to set it to 40 seconds.
220166

221167
```
222-
php bin/zs-client.php getSystemInfo --target="<name-of-the-target> \
168+
php bin/zs-client.phar getSystemInfo --target="<name-of-the-target> \
223169
--http="timeout=40"
224170
225171
```
@@ -229,7 +175,7 @@ In most cases the HTTPS access to your Zend Server will use self-signed certific
229175
In order to instruct the client to accept the SSL certificate you can do the following.
230176

231177
```
232-
php bin/zs-client.php getSystemInfo --target="<name-of-the-target> \
178+
php bin/zs-client.phar getSystemInfo --target="<name-of-the-target> \
233179
--http="sslverify=0"
234180
235181
```
@@ -238,15 +184,15 @@ php bin/zs-client.php getSystemInfo --target="<name-of-the-target> \
238184
If you want to combine multiple HTTP options in the same request then you can format the value of the http parameter as a valid
239185
HTTP query string. Request with timeout of 40 seconds and acceptance of self-signed certificates will look like this.
240186
```
241-
php bin/zs-client.php getSystemInfo --target="<name-of-the-target> \
187+
php bin/zs-client.phar getSystemInfo --target="<name-of-the-target> \
242188
--http="timeout=40&sslverify=0"
243189
```
244190

245191
### Persisting the HTTP Options
246192
If you want to keep the http options saved to a target then when defining or updating the target define also the http parameter.
247193
Format the value as valid HTTP query string. Take a look at the following example.
248194
```
249-
php bin/zs-client.php addTarget --target="<name-of-the-target> \
195+
php bin/zs-client.phar addTarget --target="<name-of-the-target> \
250196
--zsurl="http://x.y.z" \
251197
--zskey="admin" \
252198
--zssecret="<secret-hash>" \
@@ -260,7 +206,7 @@ json and kv(key value). To specify the desired format you have to use the --outp
260206

261207
Example:
262208
```
263-
php bin/zs-client.php getSystemInfo --target=zserver --output-format=kv
209+
php bin/zs-client.phar getSystemInfo --target=zserver --output-format=kv
264210
```
265211

266212
Will return

docs/FromBootstrapToProduction.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -129,4 +129,4 @@ php zs-client.phar command:all
129129

130130
Additional information about all available WebAPI commands can be found here:
131131

132-
http://files.zend.com/help/Zend-Server-6/zend-server.htm#supported_methods.htm
132+
http://files.zend.com/help/Zend-Server/zend-server.htm#supported_methods.htm

0 commit comments

Comments
 (0)