Skip to content

Commit 85de4f2

Browse files
author
Peter Matseykanets
committed
Switch to Scout 4 (Laravel 5.6) and PHPUnit 7
1 parent c10b6ad commit 85de4f2

File tree

7 files changed

+65
-31
lines changed

7 files changed

+65
-31
lines changed

.travis.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
language: php
22

33
php:
4-
- 5.6
5-
- 7.0
64
- 7.1
5+
- 7.2
76

87
env:
98
matrix:

CHANGELOG.md

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,72 @@
11
# Changelog
22

3-
## [Unreleased]
3+
## [2.0.0](https://github.com/pmatseykanets/laravel-scout-postgres/releases/tag/v2.0.0) - 2018-02-09
4+
5+
### Changed
6+
7+
- Switched to Scout 4 (Laravel 5.6) and PHPUnit 7
48

59
## [1.0.0](https://github.com/pmatseykanets/laravel-scout-postgres/releases/tag/v1.0.0) - 2017-09-03
10+
611
### Added
12+
713
- Added Laravel 5.5 support including package auto discovery.
814

915
## [0.5.0](https://github.com/pmatseykanets/laravel-scout-postgres/releases/tag/v0.5.0) - 2017-01-30
16+
1017
### Changed
18+
1119
- Updated dependencies to support Laravel 5.4 and Scout 3.0
1220

1321
### Fixed
22+
1423
- Fall back to phpunit 4.8.
1524

1625
## [0.4.1](https://github.com/pmatseykanets/laravel-scout-postgres/releases/tag/v0.4.1) - 2017-01-22
26+
1727
### Fixed
28+
1829
- Fixed #7. No longer uses `resolve()` helper to better support Laravel Lumen.
1930

2031
## [0.4.0](https://github.com/pmatseykanets/laravel-scout-postgres/releases/tag/v0.4.0) - 2017-01-16
32+
2133
### Added
34+
2235
- Made it possible to specify PostgreSQL search config both globally in scout.php or on per model basis.
2336

2437
### Changed
38+
2539
- Fixed #6. Check for models that no longer exist but still present in the index (i.e. soft-deleted models).
2640

2741
## [0.3.0](https://github.com/pmatseykanets/laravel-scout-postgres/releases/tag/v0.3.0) - 2017-01-04
42+
2843
### Changed
44+
2945
- Updated to scout 2.0.
3046
- Fixed an issue with order by clause when performing a search.
3147

3248
## [0.2.1](https://github.com/pmatseykanets/laravel-scout-postgres/releases/tag/v0.2.1) - 2016-12-23
49+
3350
### Changed
51+
3452
- Fixed #2. Cast nulls to empty strings in `toVector()`.
3553

3654
## [0.2.0](https://github.com/pmatseykanets/laravel-scout-postgres/releases/tag/v0.2.0) - 2016-10-07
55+
3756
### Added
57+
3858
- Implemented `getTotalCount()` method to support length aware pagination.
3959

4060
### Changed
61+
4162
- Updated README.md.
4263

4364
## [0.1.1](https://github.com/pmatseykanets/laravel-scout-postgres/releases/tag/v0.1.1) - 2016-10-07
65+
4466
### Changed
67+
4568
- Updated composer dependencies.
4669

4770
## [0.1.0](https://github.com/pmatseykanets/laravel-scout-postgres/releases/tag/v0.1.0) - 2016-09-02
71+
4872
Experimental release.

README.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@ This package makes it easy to use native PostgreSQL Full Text Search capabilitie
1414
## Contents
1515

1616
- [Installation](#installation)
17-
- [Scout 1.x](#scout-1x)
17+
- [Scout 4.x](#scout-4x)
1818
- [Scout 2.x, 3.x](#scout-2x-3x)
19+
- [Scout 1.x](#scout-1x)
1920
- [Laravel](#laravel)
2021
- [Lumen](#lumen)
2122
- [Configuration](#configuration)
@@ -36,16 +37,22 @@ This package makes it easy to use native PostgreSQL Full Text Search capabilitie
3637

3738
You can install the package via composer:
3839

39-
### Scout 1.x
40+
### Scout 4.x (Laravel 5.6)
4041
``` bash
41-
composer require pmatseykanets/laravel-scout-postgres:0.2.1
42+
composer require pmatseykanets/laravel-scout-postgres
4243
```
4344

4445
### Scout 2.x, 3.x
4546
``` bash
46-
composer require pmatseykanets/laravel-scout-postgres
47+
composer require pmatseykanets/laravel-scout-postgres:1.0.0
4748
```
4849

50+
### Scout 1.x
51+
``` bash
52+
composer require pmatseykanets/laravel-scout-postgres:0.2.1
53+
```
54+
55+
4956
### Laravel
5057
If you're using Laravel < 5.5 or if you have package auto-discovery turned off you have to manually register the service provider:
5158

composer.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@
2020
}
2121
],
2222
"require": {
23-
"php": ">=5.6.4",
24-
"illuminate/contracts": "5.3.*|5.4.*|5.5.*",
25-
"illuminate/database": "5.3.*|5.4.*|5.5.*",
26-
"illuminate/support": "5.3.*|5.4.*|5.5.*",
27-
"laravel/scout": "2.*|3.*"
23+
"php": ">=7.1.3",
24+
"illuminate/contracts": "5.6.*",
25+
"illuminate/database": "5.6.*",
26+
"illuminate/support": "5.6.*",
27+
"laravel/scout": "4.*"
2828
},
2929
"require-dev": {
30-
"phpunit/phpunit": "^4.8",
31-
"mockery/mockery": "^0.9.5"
30+
"phpunit/phpunit": "~7.0",
31+
"mockery/mockery": "~1.0"
3232
},
3333
"autoload": {
3434
"psr-4": {

tests/AbstractTestCase.php

Lines changed: 0 additions & 16 deletions
This file was deleted.

tests/PostgresEngineTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
use Illuminate\Database\Eloquent\SoftDeletes;
1212
use Illuminate\Database\ConnectionResolverInterface;
1313

14-
class PostgresEngineTest extends AbstractTestCase
14+
class PostgresEngineTest extends TestCase
1515
{
1616
public function test_it_can_be_instantiated()
1717
{

tests/TestCase.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?php
2+
3+
namespace ScoutEngines\Postgres\Test;
4+
5+
use Mockery;
6+
use PHPUnit\Framework\TestCase as BaseTestCase;
7+
8+
abstract class TestCase extends BaseTestCase
9+
{
10+
public function tearDown()
11+
{
12+
// Prevent PHPUnit complaining about risky tests
13+
// because Mockery expectations are not counted towards assertions
14+
if ($container = Mockery::getContainer()) {
15+
$this->addToAssertionCount($container->mockery_getExpectationCount());
16+
}
17+
18+
Mockery::close();
19+
}
20+
}

0 commit comments

Comments
 (0)