diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index b7cc948..7efe638 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -2,29 +2,55 @@ name: PHP Composer on: push: - branches: [ master ] + paths-ignore: + - '*.md' + - '*.xml' pull_request: - branches: [ master ] + paths-ignore: + - '*.md' + - '*.xml' jobs: build: + name: PHP ${{ matrix.php }}-${{ matrix.os }} runs-on: ubuntu-latest + strategy: + matrix: + os: + - ubuntu-latest + + php: + - 8.0 + - 8.1 + steps: - - uses: actions/checkout@v2 + - name: Checkout + uses: actions/checkout@v2 + + - name: Install PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + ini-values: date.timezone='UTC' + coverage: pcov + tools: composer:v2 + + - name: Determine composer cache directory on Linux + if: matrix.os == 'ubuntu-latest' + run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV - name: Validate composer.json and composer.lock run: composer validate --strict - - name: Cache Composer packages - id: composer-cache + - name: Cache dependencies installed with composer uses: actions/cache@v2 with: - path: vendor - key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} + path: ${{ env.COMPOSER_CACHE_DIR }} + key: php${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }} restore-keys: | - ${{ runner.os }}-php- + php${{ matrix.php }}-composer- - name: Install dependencies run: composer install --prefer-dist --no-progress diff --git a/composer.json b/composer.json index 9591b33..cb45ec0 100644 --- a/composer.json +++ b/composer.json @@ -18,13 +18,10 @@ ], "require": { "php": "^8.0|^8.1", - "illuminate/support": "^8.0|^9.0", "orchid/platform": "^12.0" }, "require-dev": { - "roave/security-advisories": "dev-latest", "phpunit/phpunit": "~9.0", - "orchestra/testbench": "~5|~6", "squizlabs/php_codesniffer": "^3.5" }, "autoload": { diff --git a/src/OrchidTablesServiceProvider.php b/src/OrchidTablesServiceProvider.php index 84db9f0..0e65efa 100644 --- a/src/OrchidTablesServiceProvider.php +++ b/src/OrchidTablesServiceProvider.php @@ -76,9 +76,8 @@ protected function bootForConsole(): void ], 'orchid-tables.config'); $this->publishes([ - __DIR__.'/../public/' => base_path('public/vendor/lintaba-orchid-tables/') + __DIR__ . '/../public/' => base_path('public/vendor/lintaba-orchid-tables/') ], ['orchid-tables-assets','laravel-assets']); - } /** @@ -90,10 +89,14 @@ private function registerResources(): self { View::composer('platform::app', function () { $this->dashboard - ->registerResource('scripts', - mix('/js/bulkselect.js', 'vendor/lintaba-orchid-tables')) - ->registerResource('stylesheets', - mix('/css/bulkselect.css', 'vendor/lintaba-orchid-tables')); + ->registerResource( + 'scripts', + mix('/js/bulkselect.js', 'vendor/lintaba-orchid-tables') + ) + ->registerResource( + 'stylesheets', + mix('/css/bulkselect.css', 'vendor/lintaba-orchid-tables') + ); }); return $this;