Skip to content
This repository was archived by the owner on Aug 20, 2023. It is now read-only.

Commit d30322f

Browse files
committed
laravel 7,8
1 parent ce4a5bf commit d30322f

File tree

4 files changed

+36
-52
lines changed

4 files changed

+36
-52
lines changed

.travis.yml

Lines changed: 16 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -6,33 +6,23 @@ cache:
66

77
matrix:
88
include:
9-
- php: 7.2
10-
env: LARAVEL='5.8.*' TESTBENCH='3.8.*' COMPOSER_FLAGS='--prefer-lowest'
11-
- php: 7.2
12-
env: LARAVEL='5.8.*' TESTBENCH='3.8.*' COMPOSER_FLAGS='--prefer-stable'
13-
- php: 7.3
14-
env: LARAVEL='5.8.*' TESTBENCH='3.8.*' COMPOSER_FLAGS='--prefer-lowest'
15-
- php: 7.3
16-
env: LARAVEL='5.8.*' TESTBENCH='3.8.*' COMPOSER_FLAGS='--prefer-stable'
17-
- php: 7.4snapshot
18-
env: LARAVEL='5.8.*' TESTBENCH='3.8.*' COMPOSER_FLAGS='--prefer-lowest'
19-
- php: 7.4snapshot
20-
env: LARAVEL='5.8.*' TESTBENCH='3.8.*' COMPOSER_FLAGS='--prefer-stable'
21-
- php: 7.2
22-
env: LARAVEL='^6.0' TESTBENCH='^4.0' COMPOSER_FLAGS='--prefer-lowest'
23-
- php: 7.2
24-
env: LARAVEL='^6.0' TESTBENCH='^4.0' COMPOSER_FLAGS='--prefer-stable'
25-
- php: 7.3
26-
env: LARAVEL='^6.0' TESTBENCH='^4.0' COMPOSER_FLAGS='--prefer-lowest'
27-
- php: 7.3
28-
env: LARAVEL='^6.0' TESTBENCH='^4.0' COMPOSER_FLAGS='--prefer-stable'
29-
- php: 7.4snapshot
30-
env: LARAVEL='^6.0' TESTBENCH='^4.0' COMPOSER_FLAGS='--prefer-lowest'
31-
- php: 7.4snapshot
32-
env: LARAVEL='^6.0' TESTBENCH='^4.0' COMPOSER_FLAGS='--prefer-stable'
9+
- php: 7.4
10+
env: LARAVEL='^7.0' TESTBENCH='^5.0' COMPOSER_FLAGS='--prefer-lowest'
11+
- php: 7.4
12+
env: LARAVEL='^7.0' TESTBENCH='^5.0' COMPOSER_FLAGS='--prefer-stable'
13+
- php: 8.0
14+
env: LARAVEL='^7.0' TESTBENCH='^5.0' COMPOSER_FLAGS='--prefer-lowest'
15+
- php: 8.0
16+
env: LARAVEL='^7.0' TESTBENCH='^5.0' COMPOSER_FLAGS='--prefer-stable'
17+
- php: 7.4
18+
env: LARAVEL='^8.0' TESTBENCH='^6.0' COMPOSER_FLAGS='--prefer-lowest'
19+
- php: 7.4
20+
env: LARAVEL='^8.0' TESTBENCH='^6.0' COMPOSER_FLAGS='--prefer-stable'
21+
- php: 8.0
22+
env: LARAVEL='^8.0' TESTBENCH='^6.0' COMPOSER_FLAGS='--prefer-lowest'
23+
- php: 8.0
24+
env: LARAVEL='^8.0' TESTBENCH='^6.0' COMPOSER_FLAGS='--prefer-stable'
3325
fast_finish: true
34-
allow_failures:
35-
- php: 7.4snapshot
3626

3727
before_install:
3828
- composer config discard-changes true

composer.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
}
1515
],
1616
"require": {
17-
"php": "^7.1",
18-
"moontoast/math": "^1.1"
17+
"php": "^7.4|^8",
18+
"illuminate/support": "^7|^8"
1919
},
2020
"autoload": {
2121
"psr-4": {
@@ -28,7 +28,7 @@
2828
}
2929
},
3030
"require-dev": {
31-
"orchestra/testbench": "^3.8",
32-
"phpunit/phpunit": "^8.3"
31+
"orchestra/testbench": "^6",
32+
"phpunit/phpunit": "^9"
3333
}
3434
}

phpunit.xml

Lines changed: 14 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,22 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3-
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/8.3/phpunit.xsd"
3+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
44
bootstrap="vendor/autoload.php"
55
executionOrder="depends,defects"
6-
forceCoversAnnotation="true"
7-
beStrictAboutCoversAnnotation="true"
86
beStrictAboutOutputDuringTests="true"
97
beStrictAboutTodoAnnotatedTests="true"
108
verbose="true">
11-
12-
<testsuites>
13-
<testsuite name="default">
14-
<directory suffix="Test.php">tests</directory>
15-
</testsuite>
16-
</testsuites>
17-
18-
<filter>
19-
<whitelist processUncoveredFilesFromWhitelist="true">
20-
<directory suffix=".php">src</directory>
21-
</whitelist>
22-
</filter>
23-
24-
<php>
25-
<env name="APP_KEY" value="AckfSECXIvnK5r28GVIWUAxmbBSjTsmF"/>
26-
</php>
9+
<coverage processUncoveredFiles="true">
10+
<include>
11+
<directory suffix=".php">src</directory>
12+
</include>
13+
</coverage>
14+
<testsuites>
15+
<testsuite name="default">
16+
<directory suffix="Test.php">tests</directory>
17+
</testsuite>
18+
</testsuites>
19+
<php>
20+
<env name="APP_KEY" value="AckfSECXIvnK5r28GVIWUAxmbBSjTsmF"/>
21+
</php>
2722
</phpunit>

src/HasUuidRouteKey.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
namespace Ryancco\HasUuidRouteKey;
44

5-
use Illuminate\Database\Eloquent\Model;
65
use Illuminate\Support\Str;
76
use Ramsey\Uuid\Exception\InvalidUuidStringException;
87
use Ramsey\Uuid\Uuid;
@@ -21,7 +20,7 @@ public function getUuidAttribute(): ?UuidInterface
2120
{
2221
$attribute = $this->attributes[$this->getRouteKeyName()] ?? null;
2322

24-
return !$attribute ? null : Uuid::fromString($attribute);
23+
return ! $attribute ? null : Uuid::fromString($attribute);
2524
}
2625

2726
/**
@@ -31,7 +30,7 @@ public function getUuidAttribute(): ?UuidInterface
3130
*/
3231
public function setUuidAttribute($uuid): void
3332
{
34-
if (!$uuid instanceof UuidInterface) {
33+
if (! $uuid instanceof UuidInterface) {
3534
$uuid = Uuid::fromString($uuid);
3635
}
3736

0 commit comments

Comments
 (0)