diff --git a/.github/workflows/dependabot-auto-merge.yml b/.github/workflows/dependabot-auto-merge.yml index e7e28b9..ca2197d 100644 --- a/.github/workflows/dependabot-auto-merge.yml +++ b/.github/workflows/dependabot-auto-merge.yml @@ -13,7 +13,7 @@ jobs: - name: Dependabot metadata id: metadata - uses: dependabot/fetch-metadata@v1.3.5 + uses: dependabot/fetch-metadata@v1.6.0 with: github-token: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.github/workflows/fix-php-code-style-issues.yml b/.github/workflows/fix-php-code-style-issues.yml index 9a784a1..e8ff1c6 100644 --- a/.github/workflows/fix-php-code-style-issues.yml +++ b/.github/workflows/fix-php-code-style-issues.yml @@ -8,14 +8,14 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: ${{ github.head_ref }} - name: Fix PHP code style issues - uses: aglipanci/laravel-pint-action@0.1.0 + uses: aglipanci/laravel-pint-action@2.6 - name: Commit changes - uses: stefanzweifel/git-auto-commit-action@v4 + uses: stefanzweifel/git-auto-commit-action@v5 with: commit_message: Fix styling diff --git a/.github/workflows/phpstan.yml b/.github/workflows/phpstan.yml index 557d263..ccfa9d9 100644 --- a/.github/workflows/phpstan.yml +++ b/.github/workflows/phpstan.yml @@ -11,7 +11,7 @@ jobs: name: phpstan runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup PHP uses: shivammathur/setup-php@v2 @@ -20,7 +20,7 @@ jobs: coverage: none - name: Install composer dependencies - uses: ramsey/composer-install@v1 + uses: ramsey/composer-install@v2 - name: Run PHPStan run: ./vendor/bin/phpstan --error-format=github diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 39ff7ee..bdeac46 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -13,18 +13,23 @@ jobs: fail-fast: true matrix: os: [ubuntu-latest, windows-latest] - php: [8.1] - laravel: [9.*] + php: [8.1, 8.2] + laravel: [9.*, 10.*] stability: [prefer-lowest, prefer-stable] include: - laravel: 9.* testbench: 7.* + - laravel: 10.* + testbench: 8.* + exclude: + - laravel: 9.* + php: 8.2 name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }} steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup PHP uses: shivammathur/setup-php@v2 diff --git a/.github/workflows/update-changelog.yml b/.github/workflows/update-changelog.yml index b20f3b6..0cdea23 100644 --- a/.github/workflows/update-changelog.yml +++ b/.github/workflows/update-changelog.yml @@ -10,7 +10,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: main @@ -21,7 +21,7 @@ jobs: release-notes: ${{ github.event.release.body }} - name: Commit updated CHANGELOG - uses: stefanzweifel/git-auto-commit-action@v4 + uses: stefanzweifel/git-auto-commit-action@v5 with: branch: main commit_message: Update CHANGELOG diff --git a/composer.json b/composer.json index 083c2cc..5896bb2 100644 --- a/composer.json +++ b/composer.json @@ -18,23 +18,23 @@ ], "require": { "php": "^8.1", - "illuminate/contracts": "^9.0", + "illuminate/contracts": "^9.0|^10.0", "league/csv": "^9.8", "livewire/livewire": "^2.10", "spatie/laravel-package-tools": "^1.9.2" }, "require-dev": { "laravel/pint": "^1.0", - "nunomaduro/collision": "^6.0", + "nunomaduro/collision": "^6.0|^7.0", "nunomaduro/larastan": "^2.0.1", - "orchestra/testbench": "^7.0", - "pestphp/pest": "^1.21", + "orchestra/testbench": "^7.0|^8.0", + "pestphp/pest": "^1.22", "pestphp/pest-plugin-laravel": "^1.1", "pestphp/pest-plugin-livewire": "^1.0", "phpstan/extension-installer": "^1.1", "phpstan/phpstan-deprecation-rules": "^1.0", "phpstan/phpstan-phpunit": "^1.0", - "phpunit/phpunit": "^9.5" + "phpunit/phpunit": "^9.5|^10.0" }, "autoload": { "files": [ diff --git a/package-lock.json b/package-lock.json index 1bd7e5a..22e063c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5278,9 +5278,9 @@ } }, "node_modules/img-loader/node_modules/json5": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", - "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", + "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", "dev": true, "dependencies": { "minimist": "^1.2.0" @@ -5290,9 +5290,9 @@ } }, "node_modules/img-loader/node_modules/loader-utils": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.0.tgz", - "integrity": "sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA==", + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.2.tgz", + "integrity": "sha512-I5d00Pd/jwMD2QCduo657+YM/6L3KZu++pmX9VFncxaxvHcru9jx1lBaFft+r4Mt2jK0Yhp41XlRAihzPxHNCg==", "dev": true, "dependencies": { "big.js": "^5.2.2", @@ -5597,9 +5597,9 @@ "dev": true }, "node_modules/json5": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz", - "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==", + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", "dev": true, "bin": { "json5": "lib/cli.js" @@ -5747,9 +5747,9 @@ } }, "node_modules/loader-utils": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.2.tgz", - "integrity": "sha512-TM57VeHptv569d/GKh6TAYdzKblwDNiumOdkFnejjD0XwTH87K90w3O7AiJRqdQoXygvi1VQTJTLGhJl7WqA7A==", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz", + "integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==", "dev": true, "dependencies": { "big.js": "^5.2.2", @@ -8778,9 +8778,9 @@ } }, "node_modules/vue-style-loader/node_modules/json5": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", - "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", + "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", "dev": true, "dependencies": { "minimist": "^1.2.0" @@ -8790,9 +8790,9 @@ } }, "node_modules/vue-style-loader/node_modules/loader-utils": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.0.tgz", - "integrity": "sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA==", + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.2.tgz", + "integrity": "sha512-I5d00Pd/jwMD2QCduo657+YM/6L3KZu++pmX9VFncxaxvHcru9jx1lBaFft+r4Mt2jK0Yhp41XlRAihzPxHNCg==", "dev": true, "dependencies": { "big.js": "^5.2.2", @@ -8826,9 +8826,9 @@ } }, "node_modules/webpack": { - "version": "5.74.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.74.0.tgz", - "integrity": "sha512-A2InDwnhhGN4LYctJj6M1JEaGL7Luj6LOmyBHjcI8529cm5p6VXiTIW2sn6ffvEAKmveLzvu4jrihwXtPojlAA==", + "version": "5.76.2", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.76.2.tgz", + "integrity": "sha512-Th05ggRm23rVzEOlX8y67NkYCHa9nTNcwHPBhdg+lKG+mtiW7XgggjAeeLnADAe7mLjJ6LUNfgHAuRRh+Z6J7w==", "dev": true, "dependencies": { "@types/eslint-scope": "^3.7.3", @@ -13393,18 +13393,18 @@ }, "dependencies": { "json5": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", - "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", + "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", "dev": true, "requires": { "minimist": "^1.2.0" } }, "loader-utils": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.0.tgz", - "integrity": "sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA==", + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.2.tgz", + "integrity": "sha512-I5d00Pd/jwMD2QCduo657+YM/6L3KZu++pmX9VFncxaxvHcru9jx1lBaFft+r4Mt2jK0Yhp41XlRAihzPxHNCg==", "dev": true, "requires": { "big.js": "^5.2.2", @@ -13626,9 +13626,9 @@ "dev": true }, "json5": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz", - "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==", + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", "dev": true }, "jsonfile": { @@ -13736,9 +13736,9 @@ "dev": true }, "loader-utils": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.2.tgz", - "integrity": "sha512-TM57VeHptv569d/GKh6TAYdzKblwDNiumOdkFnejjD0XwTH87K90w3O7AiJRqdQoXygvi1VQTJTLGhJl7WqA7A==", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz", + "integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==", "dev": true, "requires": { "big.js": "^5.2.2", @@ -15952,18 +15952,18 @@ }, "dependencies": { "json5": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", - "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", + "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", "dev": true, "requires": { "minimist": "^1.2.0" } }, "loader-utils": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.0.tgz", - "integrity": "sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA==", + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.2.tgz", + "integrity": "sha512-I5d00Pd/jwMD2QCduo657+YM/6L3KZu++pmX9VFncxaxvHcru9jx1lBaFft+r4Mt2jK0Yhp41XlRAihzPxHNCg==", "dev": true, "requires": { "big.js": "^5.2.2", @@ -15993,9 +15993,9 @@ } }, "webpack": { - "version": "5.74.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.74.0.tgz", - "integrity": "sha512-A2InDwnhhGN4LYctJj6M1JEaGL7Luj6LOmyBHjcI8529cm5p6VXiTIW2sn6ffvEAKmveLzvu4jrihwXtPojlAA==", + "version": "5.76.2", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.76.2.tgz", + "integrity": "sha512-Th05ggRm23rVzEOlX8y67NkYCHa9nTNcwHPBhdg+lKG+mtiW7XgggjAeeLnADAe7mLjJ6LUNfgHAuRRh+Z6J7w==", "dev": true, "requires": { "@types/eslint-scope": "^3.7.3", diff --git a/src/Concerns/HasCsvProperties.php b/src/Concerns/HasCsvProperties.php index 178e0b9..50f530d 100644 --- a/src/Concerns/HasCsvProperties.php +++ b/src/Concerns/HasCsvProperties.php @@ -20,8 +20,6 @@ trait HasCsvProperties /** * Read CSV Property - * - * @return Reader */ public function getReadCsvProperty(): Reader { @@ -30,8 +28,6 @@ public function getReadCsvProperty(): Reader /** * Get CSV Records Property - * - * @return TabularDataReader */ public function getCsvRecordsProperty(): TabularDataReader { @@ -40,8 +36,6 @@ public function getCsvRecordsProperty(): TabularDataReader /** * Handle CSV Information properties from the given file - * - * @return array|\Illuminate\Support\MessageBag */ public function handleCsvProperties(): array|MessageBag { diff --git a/src/Concerns/InteractsWithColumns.php b/src/Concerns/InteractsWithColumns.php index 8fdfc82..0448d22 100644 --- a/src/Concerns/InteractsWithColumns.php +++ b/src/Concerns/InteractsWithColumns.php @@ -6,8 +6,6 @@ trait InteractsWithColumns { /** * Converts the columnsToMap property into an associative array. - * - * @return array */ protected function mapThroughColumns(): array { @@ -22,8 +20,6 @@ protected function mapThroughColumns(): array /** * Maps requiredColumns property into columnsToMap required state. - * - * @return array */ protected function mapThroughRequiredColumns(): array { @@ -39,8 +35,6 @@ protected function mapThroughRequiredColumns(): array /** * Maps columnLabels property into columnsToMap label state. - * - * @return array */ protected function mapThroughColumnLabels(): array { diff --git a/src/Concerns/InteractsWithCsvFiles.php b/src/Concerns/InteractsWithCsvFiles.php index 9f43a71..5f7e22a 100644 --- a/src/Concerns/InteractsWithCsvFiles.php +++ b/src/Concerns/InteractsWithCsvFiles.php @@ -8,9 +8,6 @@ trait InteractsWithCsvFiles { /** * Read CSV File. - * - * @param string $path - * @return Reader */ protected function readCSV(string $path): Reader { diff --git a/src/Http/Livewire/CsvImporter.php b/src/Http/Livewire/CsvImporter.php index b627953..16fd3b0 100644 --- a/src/Http/Livewire/CsvImporter.php +++ b/src/Http/Livewire/CsvImporter.php @@ -22,25 +22,19 @@ class CsvImporter extends Component /** @var string */ public $model; - /** @var bool */ public bool $open = false; /** @var object */ public $file; - /** @var array */ public array $columnsToMap = []; - /** @var array */ public array $requiredColumns = []; - /** @var array */ public array $columnLabels = []; - /** @var array */ public array $fileHeaders = []; - /** @var int */ public int $fileRowCount = 0; /** @var array */ diff --git a/src/LaravelCsvDirectives.php b/src/LaravelCsvDirectives.php index f1d9463..0cd203e 100644 --- a/src/LaravelCsvDirectives.php +++ b/src/LaravelCsvDirectives.php @@ -20,8 +20,6 @@ public static function csvStyles(): string|null /** * Get CSV Scripts - * - * @return string */ public static function csvScripts(): string { @@ -32,8 +30,6 @@ public static function csvScripts(): string /** * Get Tailwind Style Path - * - * @return string */ protected static function getTailwindStyle(): string { diff --git a/src/LaravelCsvManager.php b/src/LaravelCsvManager.php index 4d44cf2..98e8182 100644 --- a/src/LaravelCsvManager.php +++ b/src/LaravelCsvManager.php @@ -6,10 +6,6 @@ class LaravelCsvManager { /** * Get the given size and formated it. - * - * @param int $size - * @param int $precision - * @return string|int */ public function formatFileSize(int $size, int $precision = 2): string|int { diff --git a/src/LaravelCsvServiceProvider.php b/src/LaravelCsvServiceProvider.php index eaec972..94a8900 100644 --- a/src/LaravelCsvServiceProvider.php +++ b/src/LaravelCsvServiceProvider.php @@ -43,8 +43,6 @@ public function registeringPackage() /** * Configure Laravel CSV Blade components - * - * @return void */ protected function configureComponents(): void { @@ -55,8 +53,6 @@ protected function configureComponents(): void /** * Register livewire components - * - * @return void */ protected function registerLivewireComponents(): void { @@ -69,9 +65,6 @@ protected function registerLivewireComponents(): void /** * Register given component. - * - * @param string $component - * @return void */ protected function registerComponent(string $component): void { diff --git a/src/Scopes/ImportScope.php b/src/Scopes/ImportScope.php index 2d73cf1..3273301 100644 --- a/src/Scopes/ImportScope.php +++ b/src/Scopes/ImportScope.php @@ -9,8 +9,6 @@ trait ImportScope { /** * Completed Status Scope - * - * @return \Illuminate\Database\Eloquent\Builder */ public function scopeCompleted(Builder $builder): Builder { @@ -19,8 +17,6 @@ public function scopeCompleted(Builder $builder): Builder /** * Not Completed Status Scope - * - * @return \Illuminate\Database\Eloquent\Builder */ public function scopeUnCompleted(Builder $builder): Builder { @@ -29,8 +25,6 @@ public function scopeUnCompleted(Builder $builder): Builder /** * Get the percentage of the model completion - * - * @return int|float */ public function percentageComplete(): int|float { @@ -39,9 +33,6 @@ public function percentageComplete(): int|float /** * Fetch imports based on the given model - * - * @param string $model - * @return \Illuminate\Database\Eloquent\Builder */ public function scopeForModel(Builder $builder, string $model): Builder { @@ -50,9 +41,6 @@ public function scopeForModel(Builder $builder, string $model): Builder /** * Fetch imports on the user id - * - * @param int $user - * @return \Illuminate\Database\Eloquent\Builder */ public function scopeForUser(Builder $builder, int $user): Builder { diff --git a/src/Utilities/ChunkIterator.php b/src/Utilities/ChunkIterator.php index 1a6012c..7b97719 100644 --- a/src/Utilities/ChunkIterator.php +++ b/src/Utilities/ChunkIterator.php @@ -18,14 +18,8 @@ */ class ChunkIterator { - /** - * @var Iterator - */ protected Iterator $iterator; - /** - * @var int - */ protected int $chunkSize; public function __construct(Iterator $iterator, int $chunkSize) @@ -36,8 +30,6 @@ public function __construct(Iterator $iterator, int $chunkSize) /** * Chunk the given data - * - * @return Generator */ public function get(): Generator { diff --git a/src/helpers.php b/src/helpers.php index 8cdb1d9..5532e05 100644 --- a/src/helpers.php +++ b/src/helpers.php @@ -5,9 +5,6 @@ if (! function_exists('Coderflex\LaravelCsv\csv_view_path')) { /** * Get the evaluated view content from the livewire view - * - * @param string|null $view - * @return string */ function csv_view_path(string|null $view): string {
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: