diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml new file mode 100644 index 0000000..121c37d --- /dev/null +++ b/.github/workflows/pr.yml @@ -0,0 +1,50 @@ +name: Lint Check + +on: + pull_request: + branches: [main] + +permissions: + contents: read + issues: write + pull-requests: write + +jobs: + lint: + runs-on: ubuntu-latest + name: Code Linting + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '8.2' + extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv + coverage: none + + - name: Cache Composer dependencies + uses: actions/cache@v3 + with: + path: ~/.composer/cache/files + key: dependencies-composer-${{ hashFiles('composer.json') }} + + - name: Install Composer dependencies + run: composer install --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist + + - name: Run Laravel Pint + run: ./vendor/bin/pint --test --verbose + + - name: Add PR comment on failure + if: failure() + uses: actions/github-script@v7 + with: + script: | + github.rest.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: '**Code formatting issues detected**\n\nPlease run `./vendor/bin/pint` to fix formatting issues before merging.' + }) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4e76cde..a903cbe 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -54,10 +54,10 @@ jobs: body=$(echo $response | sed -e 's/HTTPSTATUS\:.*//g') if [ "$http_code" -eq 200 ] || [ "$http_code" -eq 202 ]; then - echo "✅ Package submitted to Packagist successfully!" + echo "Package submitted to Packagist successfully!" echo "HTTP Status: $http_code" else - echo "❌ Failed to submit package to Packagist" + echo "Failed to submit package to Packagist" echo "HTTP Status: $http_code" echo "Response: $body" exit 1 diff --git a/README.md b/README.md index e4b9643..3f584e5 100644 --- a/README.md +++ b/README.md @@ -475,8 +475,8 @@ $user = RegisterUser::run($registrationData); ## Requirements -- PHP 8.1 or higher -- Laravel 9.0 or higher +- PHP 8.2 or higher +- Laravel 12.0 or higher ## Contributing @@ -489,7 +489,3 @@ This package is open-sourced software licensed under the [MIT license](LICENSE). ## Support If you discover any security vulnerabilities or bugs, please create an issue on GitHub. - ---- - -**LumoSolutions** - Making Laravel development more actionable. diff --git a/composer.json b/composer.json index f035f74..ea99d47 100644 --- a/composer.json +++ b/composer.json @@ -27,7 +27,7 @@ "php": ">=8.2" }, "require-dev": { - "laravel/pint": "^1.0" + "laravel/pint": "^1.22" }, "extra": { "laravel": {