1
0
mirror of https://github.com/danog/PHP-Parser.git synced 2025-01-20 20:57:48 +01:00
PHP-Parser/doc/1_Installation.markdown

39 lines
1.0 KiB
Markdown
Raw Normal View History

Installation
============
There are multiple ways to include the PHP parser into your project:
Installing via Composer
-----------------------
Create a `composer.json` file in your project root and use it to define your dependencies:
{
"require": {
2014-11-04 23:12:35 +01:00
"nikic/php-parser": "~1.0.2"
}
}
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 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
2014-09-12 00:20:22 +02:00
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.
[1]: http://getcomposer.org/composer.phar
[2]: https://github.com/nikic/PHP-Parser/tags