This repository has been archived on 2025-08-22. You can view files and clone it, but cannot push or open issues or pull requests.
Files
dumbo/vendor/nikic/php-parser/doc/1_Installation.markdown
2014-11-25 16:42:40 +01:00

1.2 KiB

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, 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.4"
    }
}

Then install Composer in your project (or download the composer.phar 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 nikic/PHPParser-0.9.4

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