From e90c8f17dbb613e9af423c1fb772d576e95a24fd Mon Sep 17 00:00:00 2001 From: nikic Date: Sat, 7 Jul 2012 21:34:06 +0200 Subject: [PATCH] Add installation instructions for different methods --- doc/1_Installation.markdown | 48 +++++++++++++++++++ ...n => 2_Usage_of_basic_components.markdown} | 0 ..._Other_node_tree_representations.markdown} | 0 ...on.markdown => 4_Code_generation.markdown} | 0 4 files changed, 48 insertions(+) create mode 100644 doc/1_Installation.markdown rename doc/{1_Usage_of_basic_components.markdown => 2_Usage_of_basic_components.markdown} (100%) rename doc/{2_Other_node_tree_representations.markdown => 3_Other_node_tree_representations.markdown} (100%) rename doc/{3_Code_generation.markdown => 4_Code_generation.markdown} (100%) diff --git a/doc/1_Installation.markdown b/doc/1_Installation.markdown new file mode 100644 index 0000000..4f44585 --- /dev/null +++ b/doc/1_Installation.markdown @@ -0,0 +1,48 @@ +Installation +============ + +There are multiple ways to include the PHP parser into your project: + +Installing from the Zip- or Tarball +----------------------------------- + +Download the latest version from [the download page][2], unpack it and move the files somewhere into your project. + +Installing via Composer +----------------------- + +Create a `composer.json` file in your project root and use it to define your dependencies: + + { + "require": { + "nikic/php-parser": "0.9.1" + } + } + +Then install Composer in your project (or [download the composer.phar][1] directly): + + curl -s http://getcomposer.org/installer | php + +And finally ask Composer to install the dependencies: + + php composer.phar install + +Installing as a PEAR package +---------------------------- + +Run the following two commands: + + pear channel-discover nikic.github.com/pear + pear install channel://nikic.github.com/pear/PHPParser-0.9.1 + +Installing as a Git Submodule +----------------------------- + +Run the following command to install the parser into the `vendor/PHP-Parser` folder: + + git submodule add git://github.com/nikic/PHP-Parser.git vendor/PHP-Parser + + + + [1]: http://getcomposer.org/composer.phar + [2]: https://github.com/nikic/PHP-Parser/tags \ No newline at end of file diff --git a/doc/1_Usage_of_basic_components.markdown b/doc/2_Usage_of_basic_components.markdown similarity index 100% rename from doc/1_Usage_of_basic_components.markdown rename to doc/2_Usage_of_basic_components.markdown diff --git a/doc/2_Other_node_tree_representations.markdown b/doc/3_Other_node_tree_representations.markdown similarity index 100% rename from doc/2_Other_node_tree_representations.markdown rename to doc/3_Other_node_tree_representations.markdown diff --git a/doc/3_Code_generation.markdown b/doc/4_Code_generation.markdown similarity index 100% rename from doc/3_Code_generation.markdown rename to doc/4_Code_generation.markdown