Skip to content

Commit

Permalink
Add package discovery (#14)
Browse files Browse the repository at this point in the history
* Bump dev deps

* Add automatic package discovery
  • Loading branch information
danmichaelo committed Jun 5, 2020
1 parent fae3d1b commit 40f8524
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 7 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ Via Composer
$ composer require php-http/laravel-httplug
```

Add serviceprovider and alias
With Laravel 5.5 or newer, the package will be discovered automatically.
If you're using an older version of Laravel, add the following to your
`config/app.php`:

```php
<?php
// config.app
Expand All @@ -39,11 +42,12 @@ Add serviceprovider and alias

```

Publish the package config file to config/httplug.php:
Publish the package config file to `config/httplug.php`:

```
php artisan vendor:publish --provider="Http\Httplug\HttplugServiceProvider"
```

## Usage

```php
Expand Down
20 changes: 15 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@
"php-http/discovery": "^1.0"
},
"require-dev": {
"phpunit/phpunit": "^4.5 || ^5.4",
"phpunit/phpunit": "^4.5 || ^5.4 || ^6.0",
"graham-campbell/testbench": "^3.1",
"friendsofphp/php-cs-fixer": "1.9.*",
"friendsofphp/php-cs-fixer": "^2.0",
"sllh/php-cs-fixer-styleci-bridge": "^1.5",
"php-http/curl-client": "^1.0",
"php-http/socket-client": "^1.0",
"php-http/guzzle6-adapter": "^1.1.1",
"php-http/react-adapter": "^0.2.1",
"php-http/buzz-adapter": "^0.3"
"php-http/guzzle6-adapter": "^1.1",
"php-http/react-adapter": "^2.1",
"php-http/buzz-adapter": "^1.0"
},
"autoload": {
"psr-4": {
Expand All @@ -49,5 +49,15 @@
"scripts": {
"test": "vendor/bin/phpunit",
"test-ci": "vendor/bin/phpunit --coverage-text --coverage-clover=build/coverage.xml"
},
"extra": {
"laravel": {
"providers": [
"Http\\Httplug\\HttplugServiceProvider"
],
"aliases": {
"Httplug": "Http\\Httplug\\Facade\\Httplug"
}
}
}
}

0 comments on commit 40f8524

Please sign in to comment.