Skip to content

Commit

Permalink
Support Laravel 6 (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
AntoineAugusti authored Dec 16, 2019
1 parent a81b9f3 commit 4907b00
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 28 deletions.
9 changes: 3 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
language: php

php:
- 5.4
- 5.5
- 5.6
- 7.0
- 7.1
- 7.2
- 7.3

before_script:
- composer self-update
- composer install --prefer-source --no-interaction --dev

script: phpunit
script: vendor/bin/phpunit
19 changes: 5 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,28 +12,19 @@ A Laravel wrapper for [phpInsight](https://github.com/JWHennessey/phpInsight).

## Installation

[PHP](https://php.net) 5.4+ or [HHVM](http://hhvm.com) 3.3+, and [Composer](https://getcomposer.org) are required.
[PHP](https://php.net) 7.2+, and [Composer](https://getcomposer.org) are required.

To get the latest version of Laravel Sentiment Analysis, simply add the following line to the require block of your `composer.json` file:

```json
"antoineaugusti/laravel-sentiment-analysis": "~2.0"
```

You'll then need to run `composer install` or `composer update` to download it and have the autoloader updated.

This package supports auto discovery for Laravel 5.5+. If you don't have a version above 5.5 yet, you need to register the service provider. Open up `config/app.php` and add the following to the `providers` key.

```php
Antoineaugusti\LaravelSentimentAnalysis\LaravelSentimentAnalysisServiceProvider::class,
```
To get the latest version of Laravel Sentiment Analysis, run the command `composer require antoineaugusti/laravel-sentiment-analysis`.

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

```php
'SentimentAnalysis' => Antoineaugusti\LaravelSentimentAnalysis\SentimentAnalysis::class,
```

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

#### Looking for a Laravel 4 compatible version?
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"`.

Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
}
],
"require": {
"php": ">=5.4.0",
"illuminate/support": "~5.0",
"php": ">=7.2",
"illuminate/support": "^6.0",
"jwhennessey/phpinsight": "~2.0"
},
"require-dev": {
"phpunit/phpunit": "~4.0"
"phpunit/phpunit": "^8.5"
},
"autoload": {
"psr-4": {
Expand Down
1 change: 0 additions & 1 deletion phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
syntaxCheck="false"
>
<testsuites>
<testsuite name="Package Test Suite">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
<?php

use Antoineaugusti\LaravelSentimentAnalysis\SentimentAnalysis;
use PHPUnit\Framework\TestCase;

class SentimentAnalysisReversedTest extends PHPUnit_Framework_TestCase
class SentimentAnalysisReversedTest extends TestCase
{
public $sentiment;

public function setUp()
public function setUp(): void
{
parent::setUp();

Expand Down
5 changes: 3 additions & 2 deletions tests/LaravelSentimentAnalysis/SentimentAnalysisTest.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
<?php

use Antoineaugusti\LaravelSentimentAnalysis\SentimentAnalysis;
use PHPUnit\Framework\TestCase;

class SentimentAnalysisTest extends PHPUnit_Framework_TestCase
class SentimentAnalysisTest extends TestCase
{
public $sentiment;

public function setUp()
public function setUp(): void
{
parent::setUp();

Expand Down

0 comments on commit 4907b00

Please sign in to comment.