Skip to content

Commit

Permalink
Merge pull request #3 from stylers-llc/feature/upgrade-laravel-version
Browse files Browse the repository at this point in the history
Update for next Laravel version
  • Loading branch information
balazsbencs authored Apr 1, 2021
2 parents 682a35b + a76edd0 commit ad3fcc7
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
language: php

php:
- 7.1.3
- 7.2.5

before_install:
- travis_retry composer self-update
Expand Down
12 changes: 6 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@
}
],
"require": {
"php": ">=7.1.3",
"illuminate/database": "~5",
"illuminate/support": "~5"
"php": ">=7.2.5",
"illuminate/database": "~6",
"illuminate/support": "~6"
},
"require-dev": {
"mockery/mockery": "^1.1",
"orchestra/testbench": "~3.0|~3.6|~3.7",
"phpmd/phpmd": "^2.6",
"phpunit/phpunit": "^7.3"
"orchestra/testbench": "~3.0|~3.6|~3.7|~4.0",
"phpmd/phpmd": "^2.6|^2.7|^2.8|^2.9",
"phpunit/phpunit": "^7.3|^8.0|^9.0"
},
"autoload": {
"classmap": [
Expand Down
3 changes: 2 additions & 1 deletion src/Enums/AbstractEnum.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace Stylers\Address\Enums;

use Illuminate\Support\Arr;
use Stylers\Address\Contracts\Enums\EnumInterface;
use \ReflectionClass;

Expand All @@ -13,6 +14,6 @@ public static function getConstants(): array
$reflection = new ReflectionClass($class);
$constants = $reflection->getConstants();

return array_sort($constants);
return Arr::sort($constants);
}
}
3 changes: 2 additions & 1 deletion tests/fixtures/database/factories/AddressFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
use Faker\Generator as Faker;
use Stylers\Address\Models\Address;
use Stylers\Address\Enums\AddressTypeEnum;
use Illuminate\Support\Arr;

/*
|--------------------------------------------------------------------------
Expand All @@ -18,7 +19,7 @@
/** @var \Illuminate\Database\Eloquent\Factory $factory */
$factory->define(Address::class, function (Faker $faker) {
return [
'type' => array_random(AddressTypeEnum::getConstants()),
'type' => Arr::random(AddressTypeEnum::getConstants()),
'country' => $faker->country,
'country_code' => $faker->countryCode,
'zip_code' => $faker->postcode,
Expand Down

0 comments on commit ad3fcc7

Please sign in to comment.