Skip to content

Commit d8b086e

Browse files
committed
[DOCS] Fine-tunes installation section.
1 parent 8c6aab9 commit d8b086e

File tree

2 files changed

+45
-27
lines changed

2 files changed

+45
-27
lines changed

docs/index.asciidoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11

22
= Elasticsearch-PHP
33

4+
include::{asciidoc-dir}/../../shared/attributes.asciidoc[]
5+
46
include::overview.asciidoc[]
57

68
include::quickstart.asciidoc[]
@@ -39,6 +41,4 @@ include::community.asciidoc[]
3941

4042
include::experimental-beta-apis.asciidoc[]
4143

42-
include::build/classes.asciidoc[]
43-
44-
include::{asciidoc-dir}/../../shared/attributes.asciidoc[]
44+
include::build/classes.asciidoc[]

docs/installation.asciidoc

Lines changed: 42 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,35 @@
11
[[installation]]
22
== Installation
33

4-
Elasticsearch-php only has a three requirements that you need to worry about:
4+
Elasticsearch-php only has three requirements that you need to pay attention:
55

66
* PHP 7.0.0 or higher
77
* http://getcomposer.org[Composer]
8-
* http://php.net/manual/en/book.curl.php[ext-curl]: the Libcurl extension for PHP (see note below)
8+
* http://php.net/manual/en/book.curl.php[ext-curl]: the Libcurl extension for
9+
PHP (see note below)
910
* Native JSON Extensions (`ext-json`) 1.3.7 or higher
1011

11-
The rest of the dependencies will automatically be downloaded and installed by Composer. Composer is a package and dependency manager for PHP. Installing elasticsearch-php with Composer is very easy
12+
The rest of the dependencies are automatically downloaded and installed by
13+
Composer. Composer is a package and dependency manager for PHP and makes it easy
14+
to install Elasticsearch-php.
1215

1316
[NOTE]
1417
.Libcurl can be replaced
1518
====
16-
The default HTTP handlers that ship with Elasticsearch-php require the PHP libcurl extension, but it is not technically
17-
required for the client to operate. If you have a host that does not have libcurl installed, you can use an
18-
alternate HTTP handler based on PHP streams. Performance _will_ suffer, as the libcurl extension is much faster
19+
The default HTTP handlers that ship with Elasticsearch-php require the PHP
20+
libcurl extension, but it is not technically required for the client to operate.
21+
If you have a host that does not have libcurl installed, you can use an
22+
alternate HTTP handler based on PHP streams. Performance _will_ suffer, as the
23+
libcurl extension is much faster.
1924
====
2025

2126
=== Version Matrix
2227

23-
You need to match your version of Elasticsearch to the appropriate version of this library.
28+
You need to match your version of {es} to the appropriate version of this
29+
library.
2430

25-
The master branch will always track Elasticsearch master, but it is not recommended to use `dev-master` in your production code.
31+
The master branch will always track {es} master, but it is not recommended to
32+
use `dev-master` in your production code.
2633

2734
[width="40%",options="header",frame="topbot"]
2835
|============================
@@ -37,7 +44,10 @@ The master branch will always track Elasticsearch master, but it is not recommen
3744

3845
=== Composer Installation
3946

40-
* Include elasticsearch-php in your `composer.json` file. If you are starting a new project, simply paste the following JSON snippet into a new file called `composer.json`. If you have an existing project, include this requirement under the rest of requirements already present:
47+
* Include elasticsearch-php in your `composer.json` file. If you are starting a
48+
new project, paste the following JSON snippet into a new file called
49+
`composer.json`. If you have an existing project, include this requirement
50+
under the rest of requirements already present:
4151
+
4252
[source,json]
4353
--------------------------
@@ -48,17 +58,23 @@ The master branch will always track Elasticsearch master, but it is not recommen
4858
}
4959
--------------------------
5060

51-
* Install the client with composer. The first command download the `composer.phar` PHP package, and the second command invokes the installation. Composer will automatically download any required dependencies, store them in a /vendor/ directory and build an autoloader.:
61+
* Install the client with Composer. The first command downloads the
62+
`composer.phar` PHP package, the second command invokes the installation.
63+
Composer automatically downloads any dependencies, store them in a /vendor/
64+
directory and build an autoloader:
5265
+
5366
[source,shell]
5467
--------------------------
5568
curl -s http://getcomposer.org/installer | php
5669
php composer.phar install --no-dev
5770
--------------------------
5871
+
59-
More information about http://getcomposer.org/[Composer can be found at their website].
72+
More information about
73+
http://getcomposer.org/[Composer can be found at their website].
6074

61-
* Finally, include the generated autoloader in your main project. If your project is already based on Composer, the autoloader is likely already included somewhere and you don't need to add it again. Finally, instantiate a new client:
75+
* Include the generated autoloader in your main project. If your project is
76+
already based on Composer, the autoloader is likely already included somewhere
77+
and you don't need to add it again. Finally, instantiate a new client:
6278
+
6379
[source,php]
6480
--------------------------
@@ -67,17 +83,19 @@ require 'vendor/autoload.php';
6783
$client = Elasticsearch\ClientBuilder::create()->build();
6884
--------------------------
6985
+
70-
Client instantiation is performed with a static helper function `create()`. This creates a ClientBuilder object,
71-
which helps you to set custom configurations. When you are done configuring, you call the `build()` method to generate
72-
a `Client` object. We'll discuss configuration more in the Configuration section
73-
86+
Client instantiation is performed with a static helper function `create()`. This
87+
creates a ClientBuilder object, which helps you to set custom configurations.
88+
When you are done configuring, call the `build()` method to generate a `Client`
89+
object. For further info, consult the <<configuration>> section.
7490

7591
=== --no-dev flag
76-
You'll notice that the installation command specified `--no-dev`. This prevents Composer
77-
from installing the various testing and development dependencies. For average users, there
78-
is no need to install the test suite. In particular, the development dependencies include
79-
a full copy of Elasticsearch so that tests can be run against the REST specifications. This
80-
is a rather large download for non-developers, hence the --no-dev flag
81-
82-
If you wish to contribute to development of this library, just omit the `--no-dev` flag to
83-
be able to run tests.
92+
93+
You'll notice that the installation command specified `--no-dev`. This prevents
94+
Composer from installing various testing and development dependencies. For
95+
average users, there is no need to install the test suite. In particular, the
96+
development dependencies include a full copy of {es} so that tests can be run
97+
against the REST specifications. This is a rather large download for
98+
non-developers, hence the --no-dev flag.
99+
100+
If you wish to contribute to the development of this library, just omit the
101+
`--no-dev` flag to be able to run tests.

0 commit comments

Comments
 (0)