Skip to content

Commit

Permalink
Add support for Laravel 8
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenvanassche committed Sep 9, 2020
1 parent 8cd3143 commit d950367
Show file tree
Hide file tree
Showing 9 changed files with 69 additions and 24 deletions.
File renamed without changes.
23 changes: 23 additions & 0 deletions .github/workflows/php-cs-fixer.yml
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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') }}
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ build
composer.lock
docs
vendor
.php_cs.cache
37 changes: 37 additions & 0 deletions .php_cs.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?php

$finder = Symfony\Component\Finder\Finder::create()
->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);
19 changes: 0 additions & 19 deletions .scrutinizer.yml

This file was deleted.

1 change: 0 additions & 1 deletion .styleci.yml

This file was deleted.

4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down

0 comments on commit d950367

Please sign in to comment.