Skip to content

Commit

Permalink
Merge pull request #7 from ARCANEDEV/develop
Browse files Browse the repository at this point in the history
Updating the package for Laravel 5.5
  • Loading branch information
arcanedev-maroc authored Oct 3, 2017
2 parents 8363818 + 5d38915 commit 56df628
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .scrutinizer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ checks:
tools:
external_code_coverage:
timeout: 600
runs: 3
runs: 2
php_code_sniffer:
enabled: true
config:
Expand Down
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ language: php
sudo: false

php:
- 5.6
- 7.0
- 7.1
- nightly
Expand Down
7 changes: 6 additions & 1 deletion _docs/1-Installation-and-Setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
The Laravel Messenger package has a few system requirements:

```
- PHP >= 5.6.4
- PHP >= 7.0
```

## Version Compatibility
Expand All @@ -20,14 +20,17 @@ The Laravel Messenger package has a few system requirements:
|:------------------------------------------------|:---------------------------------------------------------------------------------------|
| ![LaravelMessenger v1.x][laravel_messenger_1_x] | ![Laravel v5.1][laravel_5_1] ![Laravel v5.2][laravel_5_2] ![Laravel v5.3][laravel_5_3] |
| ![LaravelMessenger v2.x][laravel_messenger_2_x] | ![Laravel v5.4][laravel_5_4] |
| ![LaravelMessenger v3.x][laravel_messenger_3_x] | ![Laravel v5.5][laravel_5_5] |

[laravel_5_1]: https://img.shields.io/badge/v5.1-supported-brightgreen.svg?style=flat-square "Laravel v5.1"
[laravel_5_2]: https://img.shields.io/badge/v5.2-supported-brightgreen.svg?style=flat-square "Laravel v5.2"
[laravel_5_3]: https://img.shields.io/badge/v5.3-supported-brightgreen.svg?style=flat-square "Laravel v5.3"
[laravel_5_4]: https://img.shields.io/badge/v5.4-supported-brightgreen.svg?style=flat-square "Laravel v5.4"
[laravel_5_5]: https://img.shields.io/badge/v5.5-supported-brightgreen.svg?style=flat-square "Laravel v5.5"

[laravel_messenger_1_x]: https://img.shields.io/badge/version-1.*-blue.svg?style=flat-square "LaravelMessenger v1.*"
[laravel_messenger_2_x]: https://img.shields.io/badge/version-2.*-blue.svg?style=flat-square "LaravelMessenger v2.*"
[laravel_messenger_3_x]: https://img.shields.io/badge/version-3.*-blue.svg?style=flat-square "LaravelMessenger v3.*"

## Composer

Expand All @@ -37,6 +40,8 @@ You can install this package via [Composer](http://getcomposer.org/) by running

### Setup

> **NOTE :** The package will automatically register itself if you're using Laravel `>= v5.5`, so you can skip this section.
Once the package is installed, you can register the service provider in `config/app.php` in the `providers` array:

```php
Expand Down
19 changes: 13 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@
"type": "library",
"license": "MIT",
"require": {
"php": ">=5.6.4",
"arcanedev/support": "~4.1.0"
"php": ">=7.0",
"arcanedev/support": "~4.2.0"
},
"require-dev": {
"orchestra/testbench": "~3.4.0",
"orchestra/database": "~3.4.0",
"phpunit/phpcov": "~3.0",
"phpunit/phpunit": "~5.0"
"orchestra/testbench": "~3.5.0",
"orchestra/database": "~3.5.0",
"phpunit/phpcov": "~4.0",
"phpunit/phpunit": "~6.0"
},
"autoload": {
"psr-4": {
Expand All @@ -34,5 +34,12 @@
"psr-4": {
"Arcanedev\\LaravelMessenger\\Tests\\": "tests/"
}
},
"extra": {
"laravel": {
"providers": [
"Arcanedev\\LaravelMessenger\\LaravelMessengerServiceProvider"
]
}
}
}
10 changes: 6 additions & 4 deletions src/Traits/Messagable.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,15 @@ public function discussionsWithNewMessages()
*
* @param string $related
* @param string $table
* @param string $foreignKey
* @param string $otherKey
* @param string $foreignPivotKey
* @param string $relatedPivotKey
* @param string $parentKey
* @param string $relatedKey
* @param string $relation
*
* @return \Illuminate\Database\Eloquent\Relations\BelongsToMany
*/
abstract public function belongsToMany($related, $table = null, $foreignKey = null, $otherKey = null, $relation = null);
abstract public function belongsToMany($related, $table = null, $foreignPivotKey = null, $relatedPivotKey = null,
$parentKey = null, $relatedKey = null, $relation = null);

/**
* Define a one-to-many relationship.
Expand Down
2 changes: 1 addition & 1 deletion tests/Models/DiscussionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ public function it_can_skip_mark_last_read_if_participant_not_found()
/** * @var \Arcanedev\LaravelMessenger\Models\Discussion $discussion */
$discussion = $this->factory->create(Discussion::class);

$discussion->markAsRead(10);
$this->assertFalse($discussion->markAsRead(10));
}

/** @test */
Expand Down
2 changes: 1 addition & 1 deletion tests/Stubs/Models/User.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php namespace Arcanedev\LaravelMessenger\Tests\Stubs\Models;

use Arcanedev\LaravelMessenger\Traits\Messagable;
use Arcanedev\Support\Bases\Model;
use Arcanedev\Support\Database\Model;

/**
* Class User
Expand Down

0 comments on commit 56df628

Please sign in to comment.