Skip to content

Commit

Permalink
Merge pull request cakephp#863 from bcrowe/hotfix-advInstGrammar
Browse files Browse the repository at this point in the history
Correct grammar in advanced installation docs
  • Loading branch information
markstory committed Nov 6, 2013
2 parents 6822a8d + dcab5af commit cc269b4
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions en/installation/advanced-installation.rst
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
Advanced Installation
#####################

Installing CakePHP with PEAR installer
Installing CakePHP with PEAR Installer
======================================

CakePHP publishes a PEAR package that you can install using the pear installer.
Installing with the pear installer can simplify sharing CakePHP libraries
CakePHP publishes a PEAR package that you can install using the PEAR installer.
Installing with the PEAR installer can simplify sharing CakePHP libraries
across multiple applications. To install CakePHP with pear you'll need to do the
following::

Expand All @@ -14,22 +14,22 @@ following::

.. note::

On some systems installing libraries with pear will require ``sudo``.
On some systems installing libraries with PEAR will require ``sudo``.

After installing CakePHP with pear, if pear is configured correctly you should
After installing CakePHP with PEAR, if PEAR is configured correctly you should
be able to use the ``cake`` command to create a new application. Since CakePHP
will be located on PHP's ``include_path`` you won't need to make any other
changes.


Installing CakePHP with composer
Installing CakePHP with Composer
================================

Composer is a dependency management tool for PHP 5.3+. It solves many of the
problems the PEAR installer has, and simplifies managing multiple versions of
libraries. Since CakePHP publishes a PEAR package you can install CakePHP using
`composer <http://getcomposer.org>`_. Before installing CakePHP you'll need to
setup a ``composer.json`` file. A composer.json file for a CakePHP applications
setup a ``composer.json`` file. A composer.json file for a CakePHP application
would look like the following::

{
Expand All @@ -50,12 +50,12 @@ would look like the following::

Save this JSON into ``composer.json`` in the root directory of your project.
Next download the composer.phar file into your project. After you've downloaded
composer, install CakePHP. In the same directory as your ``composer.json`` run
Composer, install CakePHP. In the same directory as your ``composer.json`` run
the following::

$ php composer.phar install

Once composer has finished running you should have a directory structure that looks like::
Once Composer has finished running you should have a directory structure that looks like::

example-app/
composer.phar
Expand All @@ -79,24 +79,24 @@ changing ``CAKE_CORE_INCLUDE_PATH`` to be a relative path::
ROOT . DS . APP_DIR . '/Vendor/pear-pear.cakephp.org/CakePHP'
);

If you're installing any other libraries with composer, you'll need to setup
the autoloader, and work around an issue in composer's autoloader. In your
If you're installing any other libraries with Composer, you'll need to setup
the autoloader, and work around an issue in Composer's autoloader. In your
``Config/bootstrap.php`` file add the following::

// Load composer autoload.
// Load Composer autoload.
require APP . '/Vendor/autoload.php';

// Remove and re-prepend CakePHP's autoloader as composer thinks it is the most important.
// Remove and re-prepend CakePHP's autoloader as Composer thinks it is the most important.
// See https://github.com/composer/composer/commit/c80cb76b9b5082ecc3e5b53b1050f76bb27b127b
spl_autoload_unregister(array('App', 'load'));
spl_autoload_register(array('App', 'load'), true, true);

You should now have a functioning CakePHP application with CakePHP installed via
composer. Be sure to keep the composer.json and composer.lock file with the
You should now have a functioning CakePHP application installed via
Composer. Be sure to keep the composer.json and composer.lock file with the
rest of your source code.


Sharing CakePHP libraries with multiple applications
Sharing CakePHP Libraries with multiple Applications
====================================================

There may be some situations where you wish to place CakePHP's
Expand Down

0 comments on commit cc269b4

Please sign in to comment.