diff --git a/.github/workflows/laravel.yml b/.github/workflows/laravel.yml index e2596f9..43663e4 100644 --- a/.github/workflows/laravel.yml +++ b/.github/workflows/laravel.yml @@ -10,17 +10,17 @@ jobs: laravel-tests: runs-on: ubuntu-latest - + strategy: fail-fast: true matrix: - php: [7.3, 7.4] - + php: [7.3, 7.4, 8.0] + name: PHP ${{ matrix.php }} - + steps: - uses: actions/checkout@v2 - + - name: Cache dependencies uses: actions/cache@v1 with: @@ -33,31 +33,31 @@ jobs: php-version: ${{ matrix.php }} extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, gd, pgsql, pdo_pgsql coverage: none - + - uses: zhulik/redis-action@1.1.0 with: redis version: '5' number of databases: 100 - + - uses: harmon758/postgresql-action@v1 with: postgresql version: '11' postgresql db: 'testing' postgresql user: 'homestead' - postgresql password: 'secret' - + postgresql password: 'secret' + - name: Remove Nova on a pull request if: github.event_name == 'pull_request' run: composer remove laravel/nova --no-update --no-interaction --dev - + - name: Copy .env run: php -r "file_exists('.env') || copy('.env.example', '.env');" - + - name: Install Dependencies run: | composer config "http-basic.nova.laravel.com" "${{ secrets.NOVA_USERNAME }}" "${{ secrets.NOVA_PASSWORD }}" composer install -q --no-ansi --no-interaction --no-scripts --no-suggest --no-progress --prefer-dist - + - name: Execute Integration and Feature tests via PHPUnit run: vendor/bin/phpunit --configuration phpunit.xml.dist --testsuite Integration,Feature diff --git a/composer.json b/composer.json index 8ccb2f4..a3c90a5 100644 --- a/composer.json +++ b/composer.json @@ -15,7 +15,7 @@ } ], "require": { - "php": ">=7.3", + "php": "^7.3|^8.0", "genealabs/laravel-pivot-events": "^8.0", "illuminate/cache": "^8.0", "illuminate/config": "^8.0", @@ -23,18 +23,18 @@ "illuminate/container": "^8.0", "illuminate/database": "^8.0", "illuminate/http": "^8.0", - "illuminate/support": "^8.0" + "illuminate/support": "^8.0", + "slevomat/coding-standard": "^6.4" }, "require-dev": { "doctrine/dbal": "^2.10", - "fzaninotto/faker": "^1.9", + "fakerphp/faker": "^1.11", "laravel/nova": "^3.9", "orchestra/testbench-browser-kit": "^6.0", "orchestra/testbench": "^6.0", "php-coveralls/php-coveralls" : "^2.2", "phpmd/phpmd": "^2.7", - "phpunit/phpunit": "^8.0", - "sebastian/phpcpd": "^5.0", + "phpunit/phpunit": "^9.0", "squizlabs/php_codesniffer": "^3.4", "symfony/thanks": "^1.2", "laravel/legacy-factories": "^1.0" diff --git a/phpunit.xml b/phpunit.xml index e84a484..638c186 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -1,44 +1,34 @@ - - - - ./tests/Feature - - - ./tests/Integration - - - ./tests/Nova - - - - - ./src - - - - - - - - - - - - - - - - - + + + + ./src + + + + + ./tests/Feature + + + ./tests/Integration + + + ./tests/Nova + + + + + + + + + + + + + + + + + diff --git a/tests/Integration/CachedBuilder/BelongsToManyTest.php b/tests/Integration/CachedBuilder/BelongsToManyTest.php index 65ec329..744d756 100644 --- a/tests/Integration/CachedBuilder/BelongsToManyTest.php +++ b/tests/Integration/CachedBuilder/BelongsToManyTest.php @@ -1,4 +1,8 @@ -disableModelCaching() @@ -17,7 +21,7 @@ public function testLazyLoadingRelationship() ->books ->first() ->id; - $key = sha1("genealabs:laravel-model-caching:testing:{$this->testingSqlitePath}testing.sqlite:book-store:genealabslaravelmodelcachingcachedbelongstomany-book_store.book_id_=_{$bookId}"); + $key = sha1("genealabs:laravel-model-caching:testing:{$this->testingSqlitePath}testing.sqlite:stores:genealabslaravelmodelcachingcachedbelongstomany-book_store.book_id_=_{$bookId}"); $tags = [ "genealabs:laravel-model-caching:testing:{$this->testingSqlitePath}testing.sqlite:genealabslaravelmodelcachingtestsfixturesstore", ]; diff --git a/tools/CodeSniffer.conf b/tools/CodeSniffer.conf new file mode 100644 index 0000000..54de9e1 --- /dev/null +++ b/tools/CodeSniffer.conf @@ -0,0 +1,5 @@ + 'vendor/genealabs/php-coding-standards/src/GeneaLabs,vendor/slevomat/coding-standard/SlevomatCodingStandard', + ); +?>