Skip to content
This repository has been archived by the owner on Nov 11, 2022. It is now read-only.

Commit

Permalink
Merge pull request #7 from JamesHemery/drop-support
Browse files Browse the repository at this point in the history
Drop support of Laravel 5 and PHP < 7.4
  • Loading branch information
JamesHemery authored Apr 30, 2021
2 parents 22b69f4 + d8f2aa6 commit 8ad983c
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 14 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ jobs:
fail-fast: false
matrix:
operating-system: [ubuntu-latest]
php-versions: ['7.2', '7.3', '7.4', '8.0']
php-versions: ['7.4', '8.0']

steps:
- uses: actions/checkout@v2

Expand All @@ -22,7 +22,7 @@ jobs:
id: composer-cache
run: |
echo "::set-output name=dir::$(composer config cache-files-dir)"
- uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
Expand Down
17 changes: 10 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jamesh/laravel-uuid",
"description": "Eloquent UUID Trait for Laravel 5.7 and above.",
"description": "Eloquent UUID Trait for Laravel 6 and above.",
"type": "plugin",
"license": "MIT",
"authors": [
Expand All @@ -11,13 +11,13 @@
],
"minimum-stability": "stable",
"require": {
"php" : "^7.2|^8.0",
"illuminate/support": "^5.7|^6|^7|^8",
"illuminate/database": "^5.7|^6|^7|^8"
"php" : "^7.4|^8.0",
"illuminate/support": "^6|^7|^8",
"illuminate/database": "^6|^7|^8"
},
"require-dev": {
"phpunit/phpunit": "^7.0|^8.0",
"orchestra/testbench": "^3.7|^4|^5|^6"
"phpunit/phpunit": "^9.1",
"orchestra/testbench": "^4|^5|^6"
},
"autoload": {
"psr-4": {
Expand All @@ -30,6 +30,9 @@
}
},
"scripts": {
"test": "vendor/bin/phpunit"
"test": "vendor/bin/phpunit",
"post-autoload-dump": [
"@php ./vendor/bin/testbench package:discover --ansi"
]
}
}
8 changes: 4 additions & 4 deletions tests/HasUuidTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ class HasUuidTest extends TestCase
public function test_create()
{
$post = Post::create(['title' => 'My awesome post']);
$this->assertRegExp(self::UUID_REGEX, $post->id);
$this->assertMatchesRegularExpression(self::UUID_REGEX, $post->id);

$found = Post::first();
$this->assertRegExp(self::UUID_REGEX, $found->id);
$this->assertMatchesRegularExpression(self::UUID_REGEX, $found->id);
}

public function test_find()
Expand Down Expand Up @@ -117,7 +117,7 @@ public function test_save_new_with_empty_id()

$this->assertNotEmpty($found->id);
$this->assertNotNull($found->id);
$this->assertRegExp(self::UUID_REGEX, $found->id);
$this->assertMatchesRegularExpression(self::UUID_REGEX, $found->id);
}

public function test_create_with_empty_id()
Expand All @@ -132,7 +132,7 @@ public function test_create_with_empty_id()

$this->assertNotEmpty($found->id);
$this->assertNotNull($found->id);
$this->assertRegExp(self::UUID_REGEX, $found->id);
$this->assertMatchesRegularExpression(self::UUID_REGEX, $found->id);
});
}
}

0 comments on commit 8ad983c

Please sign in to comment.