diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 33c8a78..fb48704 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -10,17 +10,41 @@ jobs: strategy: fail-fast: false matrix: - php: [7.4, 7.3, 7.2] + php: [8.2, 8.1, 7.4, 7.3] + phpunit: ['8.4', '9.6', '10.0', '11.0'] stability: [prefer-lowest, prefer-stable] - - name: PHP ${{ matrix.php }} - ${{ matrix.stability }} + exclude: + - php: 7.3 + phpunit: '9.6' + - php: 7.3 + phpunit: '10.0' + - php: 7.3 + phpunit: '11.0' + - php: 7.4 + phpunit: '9.6' + - php: 7.4 + phpunit: '10.0' + - php: 7.4 + phpunit: '11.0' + - php: 8.1 + phpunit: '8.4' + - php: 8.1 + phpunit: '9.6' + - php: 8.1 + phpunit: '11.0' + - php: 8.2 + phpunit: '8.4' + - php: 8.2 + phpunit: '9.6' + + name: PHP ${{ matrix.php }} - PHPUnit ${{ matrix.phpunit }} - ${{ matrix.stability }} steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Cache dependencies - uses: actions/cache@v1 + uses: actions/cache@v4 with: path: ~/.composer/cache/files key: dependencies-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }} @@ -33,7 +57,7 @@ jobs: coverage: none - name: Install dependencies - run: composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-progress + run: composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-progress --with="phpunit/phpunit:^${{ matrix.phpunit }}" - name: Execute tests - run: vendor/bin/phpunit --verbose + run: vendor/bin/phpunit diff --git a/.phpunit.result.cache b/.phpunit.result.cache index eb5b029..12098d3 100644 --- a/.phpunit.result.cache +++ b/.phpunit.result.cache @@ -1 +1 @@ -C:37:"PHPUnit\Runner\DefaultTestResultCache":406:{a:2:{s:7:"defects";a:0:{}s:5:"times";a:4:{s:49:"Ownable\Tests\OwnsModelsTraitTest::testOwnsMethod";d:0.115;s:54:"Ownable\Tests\OwnsModelsTraitTest::testdoesntOwnMethod";d:0.01;s:102:"Ownable\Tests\OwnsModelsTraitTest::testItShouldUseTheInterfaceImplementationIfClassImplementsInterface";d:0.012;s:93:"Ownable\Tests\OwnsModelsTraitTest::testItShouldOverrideTheContractAndUserTheRegularValidation";d:0.009;}}} \ No newline at end of file +{"version":1,"defects":[],"times":{"Ownable\\Tests\\OwnsModelsTraitTest::testOwnsMethod":0.025,"Ownable\\Tests\\OwnsModelsTraitTest::testdoesntOwnMethod":0.002,"Ownable\\Tests\\OwnsModelsTraitTest::testItShouldUseTheInterfaceImplementationIfClassImplementsInterface":0.003,"Ownable\\Tests\\OwnsModelsTraitTest::testItShouldOverrideTheContractAndUserTheRegularValidation":0.003}} \ No newline at end of file diff --git a/composer.json b/composer.json index 88eb887..32fe279 100644 --- a/composer.json +++ b/composer.json @@ -1,15 +1,16 @@ { "name": "santigarcor/laravel-ownable", - "description": "Simple trait to manage the ownershipt of models/objects", + "description": "Simple trait to check ownership of models/objects", "keywords": ["laravel", "ownership", "ownable", "owns"], "require": { - "illuminate/database": "^6.0|^7.0|^8.0|^9.0|^10.0", - "illuminate/support": "^6.0|^7.0|^8.0|^9.0|^10.0", + "php": "^7.3|^7.4|^8.1|>=8.2", + "illuminate/database": "^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0", + "illuminate/support": "^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0", "laravel/legacy-factories": "^1.3" }, "require-dev": { - "orchestra/testbench": "^4.0|^5.0|^6.0", - "phpunit/phpunit": "^7.5.15|^8.4|^9.0" + "orchestra/testbench": "^4.0|^5.0|^6.8|^7.0|^8.0|^9.0|^10.0", + "phpunit/phpunit": "^8.4|^9.6|^10.0|^11.0" }, "autoload": { "psr-4": { diff --git a/phpunit.xml b/phpunit.xml index 2a23586..b86332a 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -1,19 +1,14 @@ - - ./tests/ + ./tests/ - \ No newline at end of file +