Skip to content

Commit a1c614a

Browse files
stephenahigginsAntoineAugusti
authored andcommitted
Switch from 'share' to 'singleton' - Laravel 5.4 compatibility. (#13)
* Switch from 'share' to 'singleton' for to ensure Laravel 5.4 compatability * Changes to Readme file to reflect newer versions of Laravel * Further changes to the readme file * Remove hvvm and add PHP 7.1
1 parent fc6e4da commit a1c614a

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ php:
55
- 5.5
66
- 5.6
77
- 7.0
8-
- hhvm
8+
- 7.1
99

1010
before_script:
1111
- composer self-update

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ You'll then need to run `composer install` or `composer update` to download it a
2323

2424
Once Laravel Sentiment Analysis is installed, you need to register the service provider. Open up `config/app.php` and add the following to the `providers` key.
2525

26-
`'Antoineaugusti\LaravelSentimentAnalysis\LaravelSentimentAnalysisServiceProvider'`
26+
Antoineaugusti\LaravelSentimentAnalysis\LaravelSentimentAnalysisServiceProvider::class,
2727

2828
You can register the SentimentAnalysis facade in the `aliases` key of your `config/app.php` file if you like.
2929

30-
`SentimentAnalysis' => 'Antoineaugusti\LaravelSentimentAnalysis\Facades\SentimentAnalysis'`
30+
'SentimentAnalysis' => Antoineaugusti\LaravelSentimentAnalysis\SentimentAnalysis::class,
3131

3232
#### Looking for a Laravel 4 compatible version?
3333
Checkout the [1.2 version](https://github.com/AntoineAugusti/laravel-sentiment-analysis/releases/tag/v1.2), installable by requiring `"antoineaugusti/laravel-sentiment-analysis": "1.2"`.

src/LaravelSentimentAnalysisServiceProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class LaravelSentimentAnalysisServiceProvider extends ServiceProvider
1313
*/
1414
public function register()
1515
{
16-
$this->app['sentimentanalysis'] = $this->app->share(function ($app) {
16+
$this->app['sentimentanalysis'] = $this->app->singleton('LaravelSentimentAnalysisServiceProvider', function ($app) {
1717
return new SentimentAnalysis();
1818
});
1919
}

0 commit comments

Comments
 (0)