update php readme

This commit is contained in:
wing328 2016-02-19 23:37:35 +08:00
parent bb59ad95cf
commit f27d2534a6
2 changed files with 33 additions and 38 deletions

View File

@ -14,11 +14,11 @@ You can install the bindings via [Composer](http://getcomposer.org/). Add this t
"repositories": [
{
"type": "git",
"url": "https://github.com/YOUR_GITHUB_ID/{{packagePath}}.git"
"url": "https://github.com/{{composerVendorName}}/{{composerProjectName}}.git"
}
],
"require": {
"{{composerVendorName}}/{{composerPackageName}}": "*@dev"
"{{composerVendorName}}/{{composerProjectName}}": "*@dev"
}
}
```
@ -27,7 +27,7 @@ Then install via `composer install`
### Manual Installation
If you do not wish to use Composer, you can download the latest release. Then, to use the bindings, include the `{{packagePath}}.php` file.
If you do not wish to use Composer, you can download the latest release. Then, to use the bindings, include the `autoload.php` file.
```php
require_once('/path/to/{{packagePath}}/autoload.php');
```

View File

@ -1,52 +1,47 @@
# SwaggerClient-php
## Requirements
PHP 5.3.3 and later.
PHP 5.4.0 and later
## Composer
## Installation & Usage
### Composer
You can install the bindings via [Composer](http://getcomposer.org/). Add this to your `composer.json`:
```
{
"repositories": [
{
"repositories": [
{
"type": "git",
"url": "https://github.com/wing328/SwaggerPetstore-php.git"
}
],
"require": {
"SwaggerPetstore/SwaggerPetstore-php": "*@dev"
}
"type": "git",
"url": "https://github.com/swagger/swagger-client.git"
}
],
"require": {
"swagger/swagger-client": "*@dev"
}
}
```
Then install via:
Then install via `composer install`
composer install
### Manual Installation
To use the bindings, use Composer's [autoload](https://getcomposer.org/doc/00-intro.md#autoloading):
If you do not wish to use Composer, you can download the latest release. Then, to use the bindings, include the `autoload.php` file.
```php
require_once('/path/to/SwaggerClient-php/autoload.php');
```
require_once('vendor/autoload.php');
## Tests
## Manual Installation
To run the unit tests:
```
composer install
./vendor/bin/phpunit lib/Tests
```
If you do not wish to use Composer, you can download the latest release. Then, to use the bindings, include the `SwaggerPetstore.php` file.
## Author
require_once('/path/to/SwaggerPetstore-php/SwaggerPetstore.php');
apiteam@swagger.io
## Getting Started
php test.php
## Documentation
TODO
## Tests
In order to run tests first install [PHPUnit](http://packagist.org/packages/phpunit/phpunit) via [Composer](http://getcomposer.org/):
composer update
To run the test suite:
./vendor/bin/phpunit tests