diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index f8cdef2..ede908e 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -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 @@ -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 }} diff --git a/composer.json b/composer.json index 6acf44c..89dcc4f 100644 --- a/composer.json +++ b/composer.json @@ -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": [ @@ -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": { @@ -30,6 +30,9 @@ } }, "scripts": { - "test": "vendor/bin/phpunit" + "test": "vendor/bin/phpunit", + "post-autoload-dump": [ + "@php ./vendor/bin/testbench package:discover --ansi" + ] } } diff --git a/tests/HasUuidTest.php b/tests/HasUuidTest.php index bea9309..798e39c 100644 --- a/tests/HasUuidTest.php +++ b/tests/HasUuidTest.php @@ -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() @@ -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() @@ -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); }); } }