Skip to content

Commit

Permalink
Merge pull request #5 from Maia-TI/fix_breaking_upgrades
Browse files Browse the repository at this point in the history
Really add compatibility with laravel after 5.7 version
  • Loading branch information
santigarcor authored Jun 4, 2020
2 parents da835c5 + 8a742fd commit 5b19c39
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
13 changes: 7 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@
}
],
"require": {
"php": ">=7.1",
"illuminate/database": "^5.0|^6.0|^7.0",
"illuminate/http": "^5.0|^6.0|^7.0",
"illuminate/support": "^5.0|^6.0|^7.0"
"php": ">=7.2.5",
"illuminate/database": "^5.7|^6.0|^7.0",
"illuminate/http": "^5.7|^6.0|^7.0",
"illuminate/support": "^5.7|^6.0|^7.0"
},
"require-dev": {
"phpunit/phpunit": "^7.1",
"orchestra/testbench": "~3.5"
"phpunit/phpunit": "^7.5",
"orchestra/testbench": "^3.7",
"mockery/mockery": "^1.2.0"
},
"autoload": {
"psr-4": {
Expand Down
8 changes: 4 additions & 4 deletions src/Builders/CollectionVuetableBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,13 @@ public function sort()

$this->collection = $this->collection
->map(function ($data) {
return array_dot($data);
return Arr::dot($data);
})
->sort($comparer)
->map(function ($data) {
foreach ($data as $key => $value) {
unset($data[$key]);
array_set($data, $key, $value);
Arr::set($data, $key, $value);
}

return $data;
Expand Down Expand Up @@ -185,7 +185,7 @@ public function applyChangesTo($results)
public function addItem($item)
{
foreach ($this->columnsToAdd as $column => $value) {
if (array_has($item, $column)) {
if (Arr::has($item, $column)) {
throw new \Exception("Can not add the '{$column}' column, the results already have that column.");
}

Expand All @@ -199,7 +199,7 @@ public function addItem($item)
public function editItem($item)
{
foreach ($this->columnsToEdit as $column => $value) {
if (array_has($item, $column) === false) {
if (Arr::has($item, $column) === false) {
throw new \Exception("Column {$column} not exist in array");
}

Expand Down

0 comments on commit 5b19c39

Please sign in to comment.