From 4cfe0ab334f15f5fba47f2627811fe5887d3eba8 Mon Sep 17 00:00:00 2001 From: Iman Date: Mon, 1 Jan 2024 16:58:13 +0330 Subject: [PATCH 1/3] Update composer.json - require-dev import analyzer package --- composer.json | 1 + 1 file changed, 1 insertion(+) diff --git a/composer.json b/composer.json index 109cabb..d77accd 100644 --- a/composer.json +++ b/composer.json @@ -24,6 +24,7 @@ "spatie/laravel-package-tools": "^1.13.0" }, "require-dev": { + "imanghafoori/php-imports-analyzer": "^1.0.6", "nunomaduro/larastan": "^2.0.1", "orchestra/testbench": "^7.0 || ^8.0", "pestphp/pest": "^1.22 || ^2.0", From 6bf228f527080aa9369e632bac1067d8201ed89c Mon Sep 17 00:00:00 2001 From: Iman Date: Mon, 1 Jan 2024 16:59:37 +0330 Subject: [PATCH 2/3] Create check_imports.yml to github workflow --- .github/workflows/check_imports.yml | 33 +++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/check_imports.yml diff --git a/.github/workflows/check_imports.yml b/.github/workflows/check_imports.yml new file mode 100644 index 0000000..cbbef7e --- /dev/null +++ b/.github/workflows/check_imports.yml @@ -0,0 +1,33 @@ +name: Check Imports + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +permissions: + contents: read + +jobs: + check_imports: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - name: Cache Composer packages + id: composer-cache + uses: actions/cache@v3 + with: + path: vendor + key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} + restore-keys: | + ${{ runner.os }}-php- + + - name: Install dependencies + run: composer install --prefer-dist --no-progress + + - name: Check Imports + run: ./vendor/bin/check_imports From c873a4115bed0d1cfff656f92f317c3ca23fd7fe Mon Sep 17 00:00:00 2001 From: Iman Ghafoori Date: Mon, 1 Jan 2024 17:10:10 +0330 Subject: [PATCH 3/3] add badge for check imports workflow --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index e53d41d..13a55d0 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,7 @@ [![Tests](https://github.com/laracraft-tech/laravel-date-scopes/actions/workflows/run-tests.yml/badge.svg?branch=main)](https://github.com/laracraft-tech/laravel-date-scopes/actions/workflows/run-tests.yml) [![License](https://img.shields.io/packagist/l/laracraft-tech/laravel-date-scopes.svg?style=flat-square)](https://packagist.org/packages/laracraft-tech/laravel-date-scopes) [![Total Downloads](https://img.shields.io/packagist/dt/laracraft-tech/laravel-date-scopes.svg?style=flat-square)](https://packagist.org/packages/laracraft-tech/laravel-date-scopes) +[![Imports](https://github.com/laracraft-tech/laravel-date-scopes/actions/workflows/check_imports.yml/badge.svg?branch=master)](https://github.com/laracraft-tech/laravel-date-scopes/actions/workflows/check_imports.yml) This package provides a big range of useful **date scopes** for your Laravel Eloquent models!