From d209b696e5b9fc78537c0264c76bef11ba57b61b Mon Sep 17 00:00:00 2001 From: Laravel Shift Date: Tue, 8 Sep 2020 02:51:07 +0000 Subject: [PATCH 1/3] Bump dependencies for Laravel 8 --- composer.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/composer.json b/composer.json index 70f3744..8a5a780 100644 --- a/composer.json +++ b/composer.json @@ -21,12 +21,12 @@ "minimum-stability": "dev", "prefer-stable": true, "require": { - "php" : "^7.2", - "illuminate/http": "^5.8|^6.0|^7.0" + "php": "^7.2", + "illuminate/http": "^5.8|^6.0|^7.0|^8.0" }, "require-dev": { - "orchestra/testbench": "^3.8|^4.0|^5.0", - "phpunit/phpunit" : "^8.0" + "orchestra/testbench": "^3.8|^4.0|^5.0|^6.0", + "phpunit/phpunit": "^8.0|^9.3" }, "autoload": { "psr-4": { From 8cd31437c77b1a0310bcb5902c73768e2dbe3f9f Mon Sep 17 00:00:00 2001 From: Laravel Shift Date: Tue, 8 Sep 2020 02:51:07 +0000 Subject: [PATCH 2/3] Update GitHub Actions for Laravel 8 --- .github/workflows/run-tests.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 0d17e6f..c232a35 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -10,9 +10,11 @@ jobs: matrix: os: [ubuntu-latest, windows-latest] php: [7.4] - laravel: [5.8.*, 6.*, 7.*] + laravel: [8.*, 5.8.*, 6.*, 7.*] dependency-version: [prefer-lowest, prefer-stable] include: + - laravel: 8.* + testbench: 6.* - laravel: 7.* testbench: 5.* - laravel: 6.* From d950367a08e9ad8341dee24a18f788e9ad32d18e Mon Sep 17 00:00:00 2001 From: Ruben Van Assche Date: Wed, 9 Sep 2020 12:09:10 +0200 Subject: [PATCH 3/3] Add support for Laravel 8 --- CONTRIBUTING.md => .github/CONTRIBUTING.md | 0 .github/workflows/php-cs-fixer.yml | 23 ++++++++++++++ .github/workflows/run-tests.yml | 4 +-- .gitignore | 1 + .php_cs.dist | 37 ++++++++++++++++++++++ .scrutinizer.yml | 19 ----------- .styleci.yml | 1 - CHANGELOG.md | 4 +++ README.md | 4 +-- 9 files changed, 69 insertions(+), 24 deletions(-) rename CONTRIBUTING.md => .github/CONTRIBUTING.md (100%) create mode 100644 .github/workflows/php-cs-fixer.yml create mode 100644 .php_cs.dist delete mode 100644 .scrutinizer.yml delete mode 100644 .styleci.yml diff --git a/CONTRIBUTING.md b/.github/CONTRIBUTING.md similarity index 100% rename from CONTRIBUTING.md rename to .github/CONTRIBUTING.md diff --git a/.github/workflows/php-cs-fixer.yml b/.github/workflows/php-cs-fixer.yml new file mode 100644 index 0000000..ee02d44 --- /dev/null +++ b/.github/workflows/php-cs-fixer.yml @@ -0,0 +1,23 @@ +name: Check & fix styling + +on: [ push ] + +jobs: + php-cs-fixer: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + with: + ref: ${{ github.head_ref }} + + - name: Run PHP CS Fixer + uses: docker://oskarstark/php-cs-fixer-ga + with: + args: --config=.php_cs.dist --allow-risky=yes + + - name: Commit changes + uses: stefanzweifel/git-auto-commit-action@v4 + with: + commit_message: Fix styling diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index c232a35..85c18c3 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -26,10 +26,10 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v1 + uses: actions/checkout@v2 - name: Cache dependencies - uses: actions/cache@v1 + uses: actions/cache@v2 with: path: ~/.composer/cache/files key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }} diff --git a/.gitignore b/.gitignore index f02a2f8..7a3c6c4 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ build composer.lock docs vendor +.php_cs.cache diff --git a/.php_cs.dist b/.php_cs.dist new file mode 100644 index 0000000..1c4e7d5 --- /dev/null +++ b/.php_cs.dist @@ -0,0 +1,37 @@ +notPath('bootstrap/*') + ->notPath('storage/*') + ->notPath('resources/view/mail/*') + ->in([ + __DIR__ . '/src', + __DIR__ . '/tests', + ]) + ->name('*.php') + ->notName('*.blade.php') + ->ignoreDotFiles(true) + ->ignoreVCS(true); + +return PhpCsFixer\Config::create() + ->setRules([ + '@PSR2' => true, + 'array_syntax' => ['syntax' => 'short'], + 'ordered_imports' => ['sortAlgorithm' => 'alpha'], + 'no_unused_imports' => true, + 'not_operator_with_successor_space' => true, + 'trailing_comma_in_multiline_array' => true, + 'phpdoc_scalar' => true, + 'unary_operator_spaces' => true, + 'binary_operator_spaces' => true, + 'blank_line_before_statement' => [ + 'statements' => ['break', 'continue', 'declare', 'return', 'throw', 'try'], + ], + 'phpdoc_single_line_var_spacing' => true, + 'phpdoc_var_without_name' => true, + 'method_argument_space' => [ + 'on_multiline' => 'ensure_fully_multiline', + 'keep_multiple_spaces_after_comma' => true, + ] + ]) + ->setFinder($finder); diff --git a/.scrutinizer.yml b/.scrutinizer.yml deleted file mode 100644 index df16b68..0000000 --- a/.scrutinizer.yml +++ /dev/null @@ -1,19 +0,0 @@ -filter: - excluded_paths: [tests/*] - -checks: - php: - remove_extra_empty_lines: true - remove_php_closing_tag: true - remove_trailing_whitespace: true - fix_use_statements: - remove_unused: true - preserve_multiple: false - preserve_blanklines: true - order_alphabetically: true - fix_php_opening_tag: true - fix_linefeed: true - fix_line_ending: true - fix_identation_4spaces: true - fix_doc_comments: true - diff --git a/.styleci.yml b/.styleci.yml deleted file mode 100644 index 0285f17..0000000 --- a/.styleci.yml +++ /dev/null @@ -1 +0,0 @@ -preset: laravel diff --git a/CHANGELOG.md b/CHANGELOG.md index fb51ff0..fa9b5c2 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ All notable changes to `laravel-robots-middleware` will be documented in this file +## 1.2.1 - 2020-09-09 + +- Add support for Laravel 8 + ## 1.2.0 - 2020-03-03 - add support for Laravel 7 diff --git a/README.md b/README.md index ca34367..95a1a87 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ # Enable or disable the indexing of your app [![Latest Version on Packagist](https://img.shields.io/packagist/v/spatie/laravel-robots-middleware.svg?style=flat-square)](https://packagist.org/packages/spatie/laravel-robots-middleware) -![GitHub Workflow Status](https://img.shields.io/github/workflow/status/spatie/laravel-blink/run-tests?label=tests) -[![Quality Score](https://img.shields.io/scrutinizer/g/spatie/laravel-robots-middleware.svg?style=flat-square)](https://scrutinizer-ci.com/g/spatie/laravel-robots-middleware) +![GitHub Workflow Status](https://img.shields.io/github/workflow/status/spatie/laravel-robots-middleware/run-tests?label=tests) +![Check & fix styling](https://github.com/spatie/laravel-robots-middleware/workflows/Check%20&%20fix%20styling/badge.svg) [![Total Downloads](https://img.shields.io/packagist/dt/spatie/laravel-robots-middleware.svg?style=flat-square)](https://packagist.org/packages/spatie/laravel-robots-middleware) A tiny, opinionated package to enable or disable indexing your site via a middleware in Laravel.