From 360a807df63af78e1c0fa59a1e318ec0d486a02a Mon Sep 17 00:00:00 2001 From: Milwad Date: Thu, 28 Mar 2024 21:28:11 +0330 Subject: [PATCH 1/4] Update composer.json --- composer.json | 1 + 1 file changed, 1 insertion(+) diff --git a/composer.json b/composer.json index 04c8942..aa82dd2 100644 --- a/composer.json +++ b/composer.json @@ -5,6 +5,7 @@ "milwad", "milwad-dev", "laravel-attributes", + "laravel attributes", "easy attributes", "laravel", "laravel attributes package" From b16ee12937ddfcf5abe269ba224dbcb85ee03bd3 Mon Sep 17 00:00:00 2001 From: Milwad Date: Thu, 28 Mar 2024 21:29:48 +0330 Subject: [PATCH 2/4] Update composer.json --- composer.json | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/composer.json b/composer.json index aa82dd2..991fdf7 100644 --- a/composer.json +++ b/composer.json @@ -16,18 +16,17 @@ { "name": "milwad khosravi", "email": "milwad.dev@gmail.com", - "homepage": "https://milwad.ir", + "homepage": "https://github.com/milwad-dev", "role": "Developer" } ], "require": { "php": "^8.0", - "illuminate/contracts": "9.*|10.*" + "laravel/framework": "^9.0|^10.0|^11.0" }, "require-dev": { - "orchestra/testbench": "^7.0 || ^8.0", - "pestphp/pest": "^1.0", - "pestphp/pest-plugin-laravel": "^1.0" + "pestphp/pest-plugin-laravel": "^1.4.0|^2.0.0", + "orchestra/testbench": "^7.0|^8.0|^9.0" }, "autoload": { "psr-4": { From 2c799383e7f66fe7951ccaf419d9aa2f01903cdb Mon Sep 17 00:00:00 2001 From: Milwad Date: Thu, 28 Mar 2024 21:30:32 +0330 Subject: [PATCH 3/4] Update run-tests.yml --- .github/workflows/run-tests.yml | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 44d9df2..91098f0 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -8,40 +8,51 @@ jobs: strategy: fail-fast: false matrix: - php: [8.2, 8.1, 8.0] - laravel: [10.*, 9.*] + php: [8.0, 8.1, 8.2, 8.3] + laravel: [9.*, 10.*, 11.*] dependency-version: [prefer-lowest, prefer-stable] include: + - laravel: 11.* + testbench: 9.* + pest-plugin-laravel: 2.3.0 + - laravel: 10.* testbench: 8.* + pest-plugin-laravel: 2.0.0 + - laravel: 9.* testbench: 7.* + pest-plugin-laravel: 1.4.0 + exclude: + - laravel: 11.* + php: 8.1 + + - laravel: 11.* + php: 8.0 + - laravel: 10.* php: 8.0 + - laravel: 9.* + php: 8.3 + name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }} steps: - name: Checkout code uses: actions/checkout@v4 - - name: Cache dependencies - uses: actions/cache@v4 - with: - path: ~/.composer/cache/files - key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }} - - name: Setup PHP uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php }} - extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, mysql, mysqli, pdo_mysql, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo + extensions: curl, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, iconv coverage: none - name: Install dependencies run: | - composer require "laravel/framework:${{ matrix.laravel }}" "nesbot/carbon:^2.63" --dev --no-interaction --no-update + composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" "pestphp/pest-plugin-laravel:${{ matrix.pest-plugin-laravel }}" --no-interaction --no-update composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction - name: Execute tests run: vendor/bin/pest \ No newline at end of file From 37be5d6fac5bb66594c36331447b1c74228ed04a Mon Sep 17 00:00:00 2001 From: Milwad Date: Thu, 28 Mar 2024 21:31:31 +0330 Subject: [PATCH 4/4] Update TestCase.php --- tests/TestCase.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/TestCase.php b/tests/TestCase.php index bea3c86..ab53b35 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -2,6 +2,7 @@ namespace Milwad\LaravelAttributes\Tests; +use Illuminate\Support\Facades\Artisan; use Milwad\LaravelAttributes\LaravelAttributesServiceProvider; abstract class TestCase extends \Orchestra\Testbench\TestCase @@ -37,6 +38,9 @@ protected function getEnvironmentSetUp($app) protected function setUp(): void { parent::setUp(); + $this->loadMigrationsFrom(__DIR__.'/SetUp/migrations'); + + Artisan::call('migrate'); } }