diff --git a/.github/workflows/pint.yml b/.github/workflows/pint.yml new file mode 100644 index 00000000..93af1d04 --- /dev/null +++ b/.github/workflows/pint.yml @@ -0,0 +1,32 @@ +name: pint + +on: + push: + branches: + - main + - 3.x + pull_request: + branches: [ main ] + +jobs: + pint: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + with: + ref: ${{ github.head_ref }} + - name: Set up PHP + uses: shivammathur/setup-php@v2 + with: + php-version: 8.3 + - name: Install dependencies + run: composer install --no-interaction + - name: Run Laravel Pint + run: ./vendor/bin/pint + - name: Commit changes + uses: stefanzweifel/git-auto-commit-action@v4 + with: + commit_message: > + chore: fix code formatting \ No newline at end of file diff --git a/composer.json b/composer.json index da0d18a7..fdba20fd 100644 --- a/composer.json +++ b/composer.json @@ -32,6 +32,7 @@ "alebatistella/duskapiconf": "^1.2", "fakerphp/faker": "^1.9.1", "laravel/dusk": "^8.0", + "laravel/pint": "^1.19", "mockery/mockery": "^1.4.4", "nunomaduro/collision": "6.4.0|^7.0|^8.1", "pestphp/pest": "^3.4", diff --git a/composer.lock b/composer.lock index 01106d4e..942ce22d 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "01ec436c2459c4760e81f7467649c604", + "content-hash": "486bc848d75cab8f5caf8a3df483d5da", "packages": [ { "name": "anourvalar/eloquent-serialize", @@ -10664,6 +10664,72 @@ }, "time": "2024-11-21T17:37:39+00:00" }, + { + "name": "laravel/pint", + "version": "v1.19.0", + "source": { + "type": "git", + "url": "https://github.com/laravel/pint.git", + "reference": "8169513746e1bac70c85d6ea1524d9225d4886f0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/pint/zipball/8169513746e1bac70c85d6ea1524d9225d4886f0", + "reference": "8169513746e1bac70c85d6ea1524d9225d4886f0", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-mbstring": "*", + "ext-tokenizer": "*", + "ext-xml": "*", + "php": "^8.1.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^3.66.0", + "illuminate/view": "^10.48.25", + "larastan/larastan": "^2.9.12", + "laravel-zero/framework": "^10.48.25", + "mockery/mockery": "^1.6.12", + "nunomaduro/termwind": "^1.17.0", + "pestphp/pest": "^2.36.0" + }, + "bin": [ + "builds/pint" + ], + "type": "project", + "autoload": { + "psr-4": { + "App\\": "app/", + "Database\\Seeders\\": "database/seeders/", + "Database\\Factories\\": "database/factories/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nuno Maduro", + "email": "enunomaduro@gmail.com" + } + ], + "description": "An opinionated code formatter for PHP.", + "homepage": "https://laravel.com", + "keywords": [ + "format", + "formatter", + "lint", + "linter", + "php" + ], + "support": { + "issues": "https://github.com/laravel/pint/issues", + "source": "https://github.com/laravel/pint" + }, + "time": "2024-12-30T16:20:10+00:00" + }, { "name": "mockery/mockery", "version": "1.6.12", @@ -13609,6 +13675,6 @@ "ext-exif": "*", "ext-gd": "*" }, - "platform-dev": [], + "platform-dev": {}, "plugin-api-version": "2.6.0" }