Skip to content

Commit 1f395ae

Browse files
authored
Merge pull request #24 from mewebstudio/6.0
Add support Laravel 6
2 parents dc1666e + fdd2b8a commit 1f395ae

File tree

5 files changed

+16
-16
lines changed

5 files changed

+16
-16
lines changed

.travis.yml

Lines changed: 2 additions & 3 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
6-
- hhvm
4+
- 7.2
5+
- 7.3
76

87
install:
98
- travis_retry composer require squizlabs/php_codesniffer:2.3.3

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
}
1717
],
1818
"require": {
19-
"php": ">=5.6.4",
20-
"illuminate/database": "5.3.*|5.4.*"
19+
"php": ">=7.2",
20+
"illuminate/database": "^5.4|^6.0"
2121
},
2222
"require-dev": {
2323
"crysalead/kahlan": "~1.1"

spec/BuilderSpec.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@
2020
$model = Stub::create();
2121
expect($model)->toReceive('queryHook');
2222
Stub::on($this->builder)->method('getModel', function () use ($model) {return $model;});
23-
$this->builder->select('column', 'value');
23+
$this->builder->select(['column', 'value']);
2424
});
2525
});

src/Builder.php

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,23 @@ class Builder extends EloquentBuilder
1717
* @var array
1818
*/
1919
protected $operators = [
20-
'=', '<', '>', '<=', '>=', '<>', '!=',
20+
'=', '<', '>', '<=', '>=', '<>', '!=', '<=>',
2121
'like', 'like binary', 'not like', 'between', 'ilike',
2222
'&', '|', '^', '<<', '>>',
2323
'rlike', 'regexp', 'not regexp',
2424
'~', '~*', '!~', '!~*', 'similar to',
25-
'not similar to',
25+
'not similar to', 'not ilike', '~~*', '!~~*',
2626
];
2727

2828
/**
2929
* The methods that should be returned from query builder.
3030
*
3131
* @var array
3232
*/
33-
protected $passthru = array(
34-
'toSql', 'lists', 'insert', 'insertGetId', 'pluck', 'value', 'count', 'raw',
35-
'min', 'max', 'avg', 'sum', 'exists', 'getBindings', 'aggregate', 'getConnection'
36-
);
33+
protected $passthru = [
34+
'toSql', 'lists', 'insert', 'insertGetId', 'pluck', 'value', 'count', 'raw', 'min', 'max',
35+
'avg', 'sum', 'exists', 'doesntExist', 'getBindings', 'aggregate', 'getConnection'
36+
];
3737

3838
/*
3939
|--------------------------------------------------------------------------
@@ -205,7 +205,6 @@ public function orWhereNotBetween($column, array $values)
205205
return $this->whereNotBetween($column, $values, 'or');
206206
}
207207

208-
209208
/**
210209
* Add a "where in" clause to the query.
211210
*

src/Hookable.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ public function getAttribute($key)
100100
*
101101
* @param string $key
102102
* @param mixed $value
103-
* @return void
103+
* @return mixed
104104
*/
105105
public function setAttribute($key, $value)
106106
{
@@ -111,7 +111,9 @@ public function setAttribute($key, $value)
111111
parent::setAttribute($key, $value);
112112
};
113113

114-
return $this->pipe($hooks, $payload, $params, $destination);
114+
$this->pipe($hooks, $payload, $params, $destination);
115+
116+
return $this;
115117
}
116118

117119
/**
@@ -144,7 +146,7 @@ public function save(array $options = [])
144146
*/
145147
public function isDirty($attributes = null)
146148
{
147-
if (! is_array($attributes) && !is_null($attributes)) {
149+
if (! is_array($attributes)) {
148150
$attributes = func_get_args();
149151
}
150152

0 commit comments

Comments
 (0)