Skip to content

Commit

Permalink
Removing references to the PEAR channel and updating zip and phar links
Browse files Browse the repository at this point in the history
  • Loading branch information
mtdowling committed Aug 13, 2014
1 parent 6ce450f commit 4955d6a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 46 deletions.
3 changes: 1 addition & 2 deletions docs/index.rst
Expand Up @@ -68,8 +68,7 @@ AWS SDK for PHP
The **AWS SDK for PHP** enables PHP developers to use `Amazon Web Services <http://aws.amazon.com/>`_ from their PHP
code, and build robust applications and software using services like Amazon S3, Amazon DynamoDB, Amazon Glacier, etc.
You can get started in minutes by installing the SDK through Composer — by requiring the ``aws/aws-sdk-php`` package —
or by downloading the standalone `aws.zip <http://pear.amazonwebservices.com/get/aws.zip>`_ or
`aws.phar <http://pear.amazonwebservices.com/get/aws.phar>`_ files.
or by downloading the standalone zip or phar package from https://github.com/aws/aws-sdk-php/releases.

Getting Started
---------------
Expand Down
48 changes: 4 additions & 44 deletions docs/installation.rst
Expand Up @@ -74,14 +74,11 @@ with the phar file are the following required and suggested libraries:
- `Monolog <https://github.com/seldaek/monolog>`_ and `Psr\\Log <https://github.com/php-fig/log>`_ for logging
- `Doctrine <https://github.com/doctrine/common>`_ for caching

You can `download the packaged Phar <http://pear.amazonwebservices.com/get/aws.phar>`_ and simply include it in your
scripts to get started::
You can download specific versions of a packaged Phar from https://github.com/aws/aws-sdk-php/releases
and simply include it in your scripts to get started::

require '/path/to/aws.phar';

If you have `phing <http://www.phing.info/>`_ installed, you can clone the SDK and build a phar file yourself using the
*"phar"* task.

.. note::

If you are using PHP with the Suhosin patch (especially common on Ubuntu and Debian distributions), you may need
Expand Down Expand Up @@ -109,7 +106,8 @@ Using the zip file is great if you:
2. Cannot use phar files due to environment limitations.
3. Want to use only specific files from the SDK.

To get started, you must `download the zip file <http://pear.amazonwebservices.com/get/aws.zip>`_, unzip it into your
To get started, you must download a specific version of the zip file from
https://github.com/aws/aws-sdk-php/releases, unzip it into your
project to a location of your choosing, and include the autoloader::

require '/path/to/aws-autoloader.php';
Expand All @@ -118,41 +116,3 @@ Alternatively, you can write your own autoloader or use an existing one from you

If you have `phing <http://www.phing.info/>`_ installed, you can clone the SDK and build a zip file yourself using the
*"zip"* task.

Installing via PEAR
~~~~~~~~~~~~~~~~~~~

.. admonition:: Installation via PEAR will soon be unsupported.

The use of PEAR as a dependency management system has declined in the PHP community in favor of Composer, and
notable projects like PHPUnit, Symfony, and Doctrine are all retiring their PEAR channels at various points
during this year. We will eventually stop updating our PEAR channel during this year, so we strongly recommend that
you switch to using Composer to install the AWS SDK for PHP.


`PEAR <http://pear.php.net/>`_ packages are easy to install, and are available in your PHP environment path so that they
are accessible to any PHP project. PEAR packages are not specific to your project, but rather to the machine they're
installed on.

From the command-line, you can install the SDK with PEAR as follows (this might need to be run as ``sudo``):

.. code-block:: sh
pear config-set auto_discover 1
pear channel-discover pear.amazonwebservices.com
pear install aws/sdk
Alternatively, you can combine all three of the preceding statements into one by doing the following:

.. code-block:: sh
pear -D auto_discover=1 install pear.amazonwebservices.com/sdk
Once the SDK has been installed via PEAR, you can include the ``aws.phar`` into your project with:

.. code-block:: php
require 'AWSSDKforPHP/aws.phar';
This assumes that the PEAR directory is in your PHP include path, which it probably is, if PEAR is working correctly.
If needed, you can determine your PEAR directory by running ``pear config-get php_dir``.

0 comments on commit 4955d6a

Please sign in to comment.